update jamespong14205,
This commit is contained in:
55
task1/project/003_src/client/pages/index.js
Normal file
55
task1/project/003_src/client/pages/index.js
Normal file
@@ -0,0 +1,55 @@
|
||||
import { Box, Button } from '@mui/material';
|
||||
import Head from 'next/head';
|
||||
import { useRouter } from 'next/router';
|
||||
import { useState } from 'react';
|
||||
|
||||
export default () => {
|
||||
const [changing_page, setChangingPage] = useState(false);
|
||||
const router = useRouter();
|
||||
|
||||
return (
|
||||
<>
|
||||
<Head>
|
||||
<title>dashboard - non-urgent case</title>
|
||||
<meta name='description' content='Generated by create next app' />
|
||||
<link rel='icon' href='/favicon.ico' />
|
||||
</Head>
|
||||
|
||||
<Box
|
||||
sx={{
|
||||
display: 'flex',
|
||||
flexDirection: 'column',
|
||||
alignItems: 'center',
|
||||
justifyContent: 'center',
|
||||
minHeight: '90vh',
|
||||
}}
|
||||
>
|
||||
<Box sx={{ display: 'flex', flexDirection: 'column', gap: '1rem' }}>
|
||||
<Box sx={{ fontWeight: 'bold', fontSize: '1.2rem' }}>Demo Patient Queue system</Box>
|
||||
<Button
|
||||
onClick={() => {
|
||||
setChangingPage(true);
|
||||
router.push('/PatientLanding');
|
||||
}}
|
||||
variant='contained'
|
||||
disableElevation
|
||||
disabled={changing_page}
|
||||
>
|
||||
I am patient
|
||||
</Button>
|
||||
<Button
|
||||
onClick={() => {
|
||||
setChangingPage(true);
|
||||
router.push('/AdminLogin');
|
||||
}}
|
||||
variant='contained'
|
||||
disableElevation
|
||||
disabled={changing_page}
|
||||
>
|
||||
I am admin
|
||||
</Button>
|
||||
</Box>
|
||||
</Box>
|
||||
</>
|
||||
);
|
||||
};
|
Reference in New Issue
Block a user