FIX: Nicer loading image

This commit is contained in:
Nicolás Hatcher
2024-10-25 17:54:37 +02:00
committed by Nicolás Hatcher Andrés
parent b7336f70d6
commit ee6a41c4f4

View File

@@ -15,11 +15,12 @@ import {
selectModelFromStorage, selectModelFromStorage,
} from "./AppComponents/storage"; } from "./AppComponents/storage";
import { WorkbookState } from "./components/workbookState"; import { WorkbookState } from "./components/workbookState";
import { IronCalcIcon } from "./icons";
function App() { function App() {
const [model, setModel] = useState<Model | null>(null); const [model, setModel] = useState<Model | null>(null);
const [workbookState, setWorkbookState] = useState<WorkbookState | null>( const [workbookState, setWorkbookState] = useState<WorkbookState | null>(
null, null
); );
useEffect(() => { useEffect(() => {
@@ -51,7 +52,12 @@ function App() {
}, []); }, []);
if (!model || !workbookState) { if (!model || !workbookState) {
return <Loading>Loading</Loading>; return (
<Loading>
<IronCalcIcon style={{width: 24, height: 24, marginBottom: 16}} />
<div>Loading IronCalc</div>
</Loading>
);
} }
// We try to save the model every second // We try to save the model every second
@@ -112,9 +118,11 @@ const Wrapper = styled("div")`
const Loading = styled("div")` const Loading = styled("div")`
height: 100%; height: 100%;
display: flex; display: flex;
flex-direction: column;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
font-size: 36px; font-family: 'Inter';
font-size: 14px;
`; `;
export default App; export default App;