* #708 apply strictier linting rules and fix simple eslint bugs * #708 fix eslint errors relate to promise * #708 fix eslint import/no-extraneous-dependencies * #708 fix eslint errors of react-hook * #708 enable eslint check for typescript --------- Co-authored-by: lethemanh <lethemanh@lethemanhs-MacBook-Pro.local>
This commit is contained in:
@@ -1,41 +1,41 @@
|
||||
import React from "react";
|
||||
import { DotLottieReact } from "@lottiefiles/dotlottie-react";
|
||||
import { Box } from "@linagora/twake-mui";
|
||||
import twakeLogo from "../../static/twake-workplace.svg";
|
||||
import React from 'react'
|
||||
import { DotLottieReact } from '@lottiefiles/dotlottie-react'
|
||||
import { Box } from '@linagora/twake-mui'
|
||||
import twakeLogo from '../../static/twake-workplace.svg'
|
||||
|
||||
export function Loading() {
|
||||
return (
|
||||
<Box
|
||||
data-testid="loading"
|
||||
sx={{
|
||||
display: "flex",
|
||||
justifyContent: "center",
|
||||
alignItems: "center",
|
||||
width: "100vw",
|
||||
height: "100vh",
|
||||
position: "fixed",
|
||||
display: 'flex',
|
||||
justifyContent: 'center',
|
||||
alignItems: 'center',
|
||||
width: '100vw',
|
||||
height: '100vh',
|
||||
position: 'fixed',
|
||||
top: 0,
|
||||
left: 0,
|
||||
left: 0
|
||||
}}
|
||||
>
|
||||
<DotLottieReact
|
||||
src="/loadercalendar.lottie"
|
||||
loop
|
||||
autoplay
|
||||
style={{ width: "175px" }}
|
||||
style={{ width: '175px' }}
|
||||
/>
|
||||
<Box
|
||||
component="img"
|
||||
src={twakeLogo}
|
||||
alt="twake workplace"
|
||||
sx={{
|
||||
position: "absolute",
|
||||
bottom: "50px",
|
||||
left: "50%",
|
||||
transform: "translateX(-50%)",
|
||||
width: "210px",
|
||||
position: 'absolute',
|
||||
bottom: '50px',
|
||||
left: '50%',
|
||||
transform: 'translateX(-50%)',
|
||||
width: '210px'
|
||||
}}
|
||||
/>
|
||||
</Box>
|
||||
);
|
||||
)
|
||||
}
|
||||
|
||||
@@ -1,31 +1,31 @@
|
||||
import type { AlertColor } from "@linagora/twake-mui";
|
||||
import { Alert, Snackbar } from "@linagora/twake-mui";
|
||||
import type { AlertColor } from '@linagora/twake-mui'
|
||||
import { Alert, Snackbar } from '@linagora/twake-mui'
|
||||
|
||||
export function SnackbarAlert({
|
||||
open,
|
||||
setOpen,
|
||||
message,
|
||||
severity = "success",
|
||||
severity = 'success'
|
||||
}: {
|
||||
open: boolean;
|
||||
setOpen: (o: boolean) => void;
|
||||
message: string;
|
||||
severity?: AlertColor;
|
||||
open: boolean
|
||||
setOpen: (o: boolean) => void
|
||||
message: string
|
||||
severity?: AlertColor
|
||||
}) {
|
||||
return (
|
||||
<Snackbar
|
||||
open={open}
|
||||
autoHideDuration={2000}
|
||||
onClose={() => setOpen(false)}
|
||||
anchorOrigin={{ vertical: "bottom", horizontal: "center" }}
|
||||
anchorOrigin={{ vertical: 'bottom', horizontal: 'center' }}
|
||||
>
|
||||
<Alert
|
||||
severity={severity}
|
||||
onClose={() => setOpen(false)}
|
||||
sx={{ width: "100%" }}
|
||||
sx={{ width: '100%' }}
|
||||
>
|
||||
{message}
|
||||
</Alert>
|
||||
</Snackbar>
|
||||
);
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user