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 (
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
+
+
+
-
-
+
+ {" "}
-
-
-
-
+
+
+
);
diff --git a/src/SampleDropdown.tsx b/src/SampleDropdown.tsx
index ba7e4e0..f57dfa7 100644
--- a/src/SampleDropdown.tsx
+++ b/src/SampleDropdown.tsx
@@ -1,12 +1,9 @@
-import { useState } from "react";
import { Button, Dropdown, Space, message } from "antd";
import { DownOutlined } from "@ant-design/icons";
import useAppStore from "./store";
-function SampleDropdown() {
- const [loading, setLoading] = useState(false);
-
+function SampleDropdown({ setLoading }: { setLoading: any }) {
const samples = useAppStore((state) => state.samples);
const loadSample = useAppStore((state) => state.loadSample);
@@ -37,7 +34,7 @@ function SampleDropdown() {
return (
-
diff --git a/src/index.css b/src/index.css
index a42448e..9566cb5 100644
--- a/src/index.css
+++ b/src/index.css
@@ -1,5 +1,6 @@
-body,
-html {
+html,
+body {
+ height: 100vh;
margin: 0;
padding: 0;
}