replace inline loading text with LoadingScreen component in multiple pages
```
This commit is contained in:
louiscklaw
2025-05-14 16:27:30 +08:00
parent 0aefbfaeae
commit 56f0f30ffb
3 changed files with 5 additions and 3 deletions

View File

@@ -28,6 +28,7 @@ import { useEffect, useState } from 'react';
import { getUserMetaById } from '../../../db/UserMetas/GetById';
import { useTranslation } from 'react-i18next';
import { UserMeta } from '../../../db/UserMetas/type';
import { LoadingScreen } from '../../../components/LoadingScreen';
function StudentInfo(): React.JSX.Element {
const router = useIonRouter();
@@ -64,7 +65,7 @@ function StudentInfo(): React.JSX.Element {
void handleFetchUserMeta();
}, []);
if (showLoading) return <>loading</>;
if (showLoading) return <LoadingScreen />;
if (showError.show) return <>{showError.message}</>;
return (