``refactor Rename LoadingScreen component to LoadingSpinner and refactor structure for better reusability``

This commit is contained in:
2025-05-16 15:55:07 +08:00
parent 3556e77a7c
commit 34a7ff7ac9

View File

@@ -1,12 +1,11 @@
import { IonContent, IonPage, IonSpinner } from '@ionic/react';
import React from 'react';
import { useTranslation } from 'react-i18next';
export function LoadingScreen() {
const { t, i18n } = useTranslation();
export function LoadingSpinner(): React.JSX.Element {
const { t } = useTranslation();
return (
<IonPage>
<IonContent fullscreen>
<div
style={{
display: 'flex',
@@ -20,6 +19,14 @@ export function LoadingScreen() {
<IonSpinner></IonSpinner>
<div>{t('Loading')}</div>
</div>
);
}
export function LoadingScreen(): React.JSX.Element {
return (
<IonPage>
<IonContent fullscreen>
<LoadingSpinner />
</IonContent>
</IonPage>
);