diff options
Diffstat (limited to 'src/components/Admin.tsx')
-rw-r--r-- | src/components/Admin.tsx | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/src/components/Admin.tsx b/src/components/Admin.tsx index 8f6ce12..fac3306 100644 --- a/src/components/Admin.tsx +++ b/src/components/Admin.tsx @@ -1,7 +1,6 @@ -import Paper from '@mui/material/Paper'; -import Typography from '@mui/material/Typography'; +import { Paper, Typography } from '@mui/material'; -import { useGetGuestsQuery } from '../apiSlice' +import { useGetGuestsQuery } from '../apiSlice'; function Admin() { const { @@ -10,26 +9,26 @@ function Admin() { isSuccess, isError, error - } = useGetGuestsQuery() + } = useGetGuestsQuery(); - let content + let content; if (isLoading) { - content = <Typography variant="h4">Loading...</Typography> + content = <Typography variant="h6">Loading...</Typography> } else if (isSuccess) { - content = JSON.stringify(guests) + content = JSON.stringify(guests); } else if (isError) { content = <>{error.toString()}</> } return ( <Paper> - <Typography variant="h4" component="h4"> + <Typography variant="h6"> Admin </Typography> {content} </Paper> - ) + ); } export default Admin; |