l-min-components 1.7.1502 → 1.7.1504
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -78,8 +78,19 @@ const AppMainLayout = ({ children }) => {
|
|
|
78
78
|
useState(true);
|
|
79
79
|
const [selectedAccount, setSelectedAccount] = useState();
|
|
80
80
|
const [affilitateSearch, setAffilitateSearch] = useState("");
|
|
81
|
+
const [showChildren, setShowChildren] = useState(false);
|
|
81
82
|
|
|
82
83
|
const [loading, setLoading] = useState(true);
|
|
84
|
+
|
|
85
|
+
// Add timeout for showing children
|
|
86
|
+
useEffect(() => {
|
|
87
|
+
const timer = setTimeout(() => {
|
|
88
|
+
setShowChildren(true);
|
|
89
|
+
}, 3000);
|
|
90
|
+
|
|
91
|
+
return () => clearTimeout(timer);
|
|
92
|
+
}, []);
|
|
93
|
+
|
|
83
94
|
// for mobile view
|
|
84
95
|
useEffect(() => {
|
|
85
96
|
const handleResize = () => setDeviceWidth(window.innerWidth);
|
|
@@ -624,8 +635,10 @@ const AppMainLayout = ({ children }) => {
|
|
|
624
635
|
</div>
|
|
625
636
|
</div>
|
|
626
637
|
</div>
|
|
627
|
-
) : (
|
|
638
|
+
) : showChildren ? (
|
|
628
639
|
<ChildrenWrap>{children ?? <Outlet />}</ChildrenWrap>
|
|
640
|
+
) : (
|
|
641
|
+
<FullPageLoader hasBackground fixed={true} />
|
|
629
642
|
)}
|
|
630
643
|
</>
|
|
631
644
|
)}
|