```
replace inline loading text with LoadingScreen component in multiple pages ```
This commit is contained in:
@@ -35,7 +35,7 @@ const LessonContainer: React.FC<ContainerProps> = ({ lesson_type_id: lesson_type
|
||||
|
||||
if (loading) return <LoadingScreen />;
|
||||
if (!selected_content) return <LoadingScreen />;
|
||||
if (selected_content.length == 0) return <>loading</>;
|
||||
if (selected_content.length == 0) return <LoadingScreen />;
|
||||
|
||||
return (
|
||||
<>
|
||||
|
@@ -20,6 +20,7 @@ import { Paths } from '../../../Paths';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { useEffect, useState } from 'react';
|
||||
import { useUser } from '../../../hooks/use-user';
|
||||
import { LoadingScreen } from '../../../components/LoadingScreen';
|
||||
|
||||
const AuthHome = () => {
|
||||
const { t } = useTranslation();
|
||||
@@ -42,7 +43,7 @@ const AuthHome = () => {
|
||||
setShowLoading(false);
|
||||
}, []);
|
||||
|
||||
if (showLoading) return <>loading</>;
|
||||
if (showLoading) return <LoadingScreen />;
|
||||
if (showError) return <>{showError.message}</>;
|
||||
|
||||
return (
|
||||
|
@@ -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 (
|
||||
|
Reference in New Issue
Block a user