``refactor Rename LoadingScreen component to LoadingSpinner and refactor structure for better reusability
``
This commit is contained in:
@@ -1,12 +1,11 @@
|
|||||||
import { IonContent, IonPage, IonSpinner } from '@ionic/react';
|
import { IonContent, IonPage, IonSpinner } from '@ionic/react';
|
||||||
|
import React from 'react';
|
||||||
import { useTranslation } from 'react-i18next';
|
import { useTranslation } from 'react-i18next';
|
||||||
|
|
||||||
export function LoadingScreen() {
|
export function LoadingSpinner(): React.JSX.Element {
|
||||||
const { t, i18n } = useTranslation();
|
const { t } = useTranslation();
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<IonPage>
|
|
||||||
<IonContent fullscreen>
|
|
||||||
<div
|
<div
|
||||||
style={{
|
style={{
|
||||||
display: 'flex',
|
display: 'flex',
|
||||||
@@ -20,6 +19,14 @@ export function LoadingScreen() {
|
|||||||
<IonSpinner></IonSpinner>
|
<IonSpinner></IonSpinner>
|
||||||
<div>{t('Loading')}</div>
|
<div>{t('Loading')}</div>
|
||||||
</div>
|
</div>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
export function LoadingScreen(): React.JSX.Element {
|
||||||
|
return (
|
||||||
|
<IonPage>
|
||||||
|
<IonContent fullscreen>
|
||||||
|
<LoadingSpinner />
|
||||||
</IonContent>
|
</IonContent>
|
||||||
</IonPage>
|
</IonPage>
|
||||||
);
|
);
|
||||||
|
Reference in New Issue
Block a user