|
@@ -1,28 +1,26 @@
|
|
|
-import { useTranslation } from 'react-i18next'
|
|
|
|
|
-
|
|
|
|
|
type LoadingBrandedTypes = {
|
|
type LoadingBrandedTypes = {
|
|
|
loadProgress: number // Percentage
|
|
loadProgress: number // Percentage
|
|
|
label?: string
|
|
label?: string
|
|
|
- error?: string | null
|
|
|
|
|
|
|
+ hasError?: boolean
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
export default function LoadingBranded({
|
|
export default function LoadingBranded({
|
|
|
loadProgress,
|
|
loadProgress,
|
|
|
label,
|
|
label,
|
|
|
- error,
|
|
|
|
|
|
|
+ hasError = false,
|
|
|
}: LoadingBrandedTypes) {
|
|
}: LoadingBrandedTypes) {
|
|
|
- const { t } = useTranslation()
|
|
|
|
|
return (
|
|
return (
|
|
|
- <div className="loading-screen-brand-container">
|
|
|
|
|
- <div
|
|
|
|
|
- className="loading-screen-brand"
|
|
|
|
|
- style={{ height: `${loadProgress}%` }}
|
|
|
|
|
- />
|
|
|
|
|
- {error ? (
|
|
|
|
|
- <p className="loading-screen-error">{error}</p>
|
|
|
|
|
- ) : (
|
|
|
|
|
|
|
+ <>
|
|
|
|
|
+ <div className="loading-screen-brand-container">
|
|
|
|
|
+ <div
|
|
|
|
|
+ className="loading-screen-brand"
|
|
|
|
|
+ style={{ height: `${loadProgress}%` }}
|
|
|
|
|
+ />
|
|
|
|
|
+ </div>
|
|
|
|
|
+
|
|
|
|
|
+ {!hasError && (
|
|
|
<div className="h3 loading-screen-label" aria-live="polite">
|
|
<div className="h3 loading-screen-label" aria-live="polite">
|
|
|
- {label || t('loading')}
|
|
|
|
|
|
|
+ {label}
|
|
|
<span className="loading-screen-ellip" aria-hidden="true">
|
|
<span className="loading-screen-ellip" aria-hidden="true">
|
|
|
.
|
|
.
|
|
|
</span>
|
|
</span>
|
|
@@ -34,6 +32,6 @@ export default function LoadingBranded({
|
|
|
</span>
|
|
</span>
|
|
|
</div>
|
|
</div>
|
|
|
)}
|
|
)}
|
|
|
- </div>
|
|
|
|
|
|
|
+ </>
|
|
|
)
|
|
)
|
|
|
}
|
|
}
|