``refactor Rename LoadingScreen component to LoadingSpinner and refactor structure for better reusability
``
This commit is contained in:
@@ -1,25 +1,32 @@
|
||||
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 (
|
||||
<div
|
||||
style={{
|
||||
display: 'flex',
|
||||
flexDirection: 'column',
|
||||
alignItems: 'center',
|
||||
gap: '1rem',
|
||||
//
|
||||
marginTop: '33vh',
|
||||
}}
|
||||
>
|
||||
<IonSpinner></IonSpinner>
|
||||
<div>{t('Loading')}</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
export function LoadingScreen(): React.JSX.Element {
|
||||
return (
|
||||
<IonPage>
|
||||
<IonContent fullscreen>
|
||||
<div
|
||||
style={{
|
||||
display: 'flex',
|
||||
flexDirection: 'column',
|
||||
alignItems: 'center',
|
||||
gap: '1rem',
|
||||
//
|
||||
marginTop: '33vh',
|
||||
}}
|
||||
>
|
||||
<IonSpinner></IonSpinner>
|
||||
<div>{t('Loading')}</div>
|
||||
</div>
|
||||
<LoadingSpinner />
|
||||
</IonContent>
|
||||
</IonPage>
|
||||
);
|
||||
|
Reference in New Issue
Block a user