Files
workavia-drive/tdrive/frontend/src/app/components/loader/application-loader.tsx
T
Romaric Mourgues 0ff1cc97d4 Clean frontend files
2023-04-18 11:22:14 +02:00

33 lines
802 B
TypeScript

// eslint-disable-next-line @typescript-eslint/no-use-before-define
import React from 'react';
import Languages from '@features/global/services/languages-service';
type PropsType = {
message?: string;
};
export default (props: PropsType) => (
<div
id="application_loader"
style={{
display: 'flex',
justifyContent: 'center',
position: 'absolute',
// push it below the infinite loader which is defined in index.html
top: 'calc(50% + 50px)',
width: '100%',
color: 'var(--white)',
textAlign: 'center',
}}
>
<div>
{props.message ||
Languages.t(
'application.load.longer',
[],
'Server takes longer than expected to reply, please wait or reload the page...',
)}
</div>
</div>
);