Skip to content

Commit fc97d0c

Browse files
committed
refactor(LoadingFallback): enhance layout stability and styling for loading state
1 parent 85b4d77 commit fc97d0c

1 file changed

Lines changed: 10 additions & 4 deletions

File tree

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,25 @@
11
/**
2-
* Loading fallback component for i18next suspense
2+
* Loading fallback component for i18next suspense and lazy components.
3+
* Uses 100% height to fill its parent container without causing layout shifts
4+
* by forcing a 100vh height in contained areas.
35
*/
46
export function LoadingFallback() {
57
return (
68
<div
79
style={{
810
display: "flex",
11+
flexDirection: "column",
912
justifyContent: "center",
1013
alignItems: "center",
11-
height: "100vh",
14+
height: "100%",
15+
width: "100%",
16+
minHeight: "200px",
1217
fontSize: "18px",
13-
color: "#666",
18+
color: "var(--text-muted, #666)",
19+
background: "transparent",
1420
}}
1521
>
16-
Loading...
22+
<div className="animate-pulse">Loading...</div>
1723
</div>
1824
);
1925
}

0 commit comments

Comments
 (0)