diff --git a/src/AgreementHtml.tsx b/src/AgreementHtml.tsx index 1a593f9..bdcdffb 100644 --- a/src/AgreementHtml.tsx +++ b/src/AgreementHtml.tsx @@ -1,12 +1,49 @@ -import useAppStore from './store'; +import { Spin } from "antd"; +import useAppStore from "./store"; -function AgreementHtml() { - const agreementHtml = useAppStore((state) => state.agreementHtml) - return
-

Preview Ouput

-

The result of merging the JSON data with the template. This is AgreementMark converted to HTML.

-
-
; +function AgreementHtml({ loading }: { loading: any }) { + const agreementHtml = useAppStore((state) => state.agreementHtml); + + return ( +
+
+

Preview Output

+

+ The result of merging the JSON data with the template. This is + AgreementMark converted to HTML. +

+
+ {loading ? ( +
+ +
+ ) : ( +
+ )} +
+ ); } export default AgreementHtml; diff --git a/src/App.tsx b/src/App.tsx index 440ae2a..e289b75 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -13,9 +13,11 @@ import useAppStore from "./store"; import SampleDropdown from "./SampleDropdown"; const { Content } = Layout; + const App = () => { const init = useAppStore((state) => state.init); const [activePanel, setActivePanel] = useState(); + const [loading, setLoading] = useState(true); const scrollToExplore = () => { const exploreContent = document.getElementById("explore"); @@ -33,7 +35,11 @@ const App = () => { }; useEffect(() => { - void init(); + const initializeApp = async () => { + await init(); + setLoading(false); + }; + initializeApp(); }, [init]); const panels = [ @@ -56,50 +62,48 @@ const App = () => { return ( - - - - + + + +
+ + + + + + + +
- - - + + + - - + + {" "} -
- - - - - - - - -
- -
- +
+
+