Skip to content

Commit 9d093c6

Browse files
committed
change TACModal, in register page button VIEW
1 parent 93b4f4b commit 9d093c6

File tree

1 file changed

+38
-46
lines changed

1 file changed

+38
-46
lines changed

src/components/TACModal.tsx

Lines changed: 38 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -1,77 +1,69 @@
11
'use client';
2-
import { Box, Button, Modal, Typography } from '@mui/material';
2+
33
import { useState } from 'react';
44

5-
const style = {
6-
position: 'absolute',
7-
top: '50%',
8-
left: '50%',
9-
transform: 'translate(-50%, -50%)',
10-
width: { xs: '80%', sm: '60%' },
11-
bgcolor: 'background.paper',
12-
border: '2px solid #000',
13-
boxShadow: 24,
14-
p: 4,
15-
} as const;
5+
import {
6+
Dialog,
7+
DialogContent,
8+
DialogHeader,
9+
DialogTitle,
10+
} from '@/components/ui/dialog';
11+
import { Button } from '@/components/ui/button';
1612

1713
export default function TACModal() {
1814
const [open, setOpen] = useState(false);
1915
const handleOpen = () => setOpen(true);
20-
const handleClose = () => setOpen(false);
2116

2217
return (
2318
<div>
24-
<Button onClick={handleOpen}>View Terms and Conditions</Button>
25-
<Modal
26-
open={open}
27-
onClose={handleClose}
28-
aria-labelledby='modal-modal-title'
29-
aria-describedby='modal-modal-description'
30-
>
31-
<Box sx={style}>
32-
<Typography id='modal-modal-title' variant='h6' component='h2' align='center'>
33-
Terms and Conditions
34-
</Typography>
35-
<Typography id='modal-modal-description' sx={{ mt: 2 }}>
36-
<ol className='list-decimal'>
19+
<Button variant='link' onClick={handleOpen}>
20+
VIEW
21+
</Button>
22+
<Dialog open={open} onOpenChange={setOpen}>
23+
<DialogContent className='max-w-xl'>
24+
<DialogHeader>
25+
<DialogTitle className='text-center'>Terms and Conditions</DialogTitle>
26+
</DialogHeader>
27+
<div className='space-y-4 text-sm text-muted-foreground mt-2 max-h-[70vh] overflow-y-auto'>
28+
<ol className='list-decimal list-inside space-y-2'>
3729
<li>You can use Polygon to develop problems only.</li>
3830
<li>
3931
You should use your real name and all information about you should be
4032
correct and accurate.
4133
</li>
4234
<li>
4335
You should not submit files containing malicious code:
44-
<ul className='list-disc list-inside'>
45-
<li>trojan horses;</li>
46-
<li>rootkits;</li>
47-
<li>backdoors;</li>
48-
<li>viruses.</li>
36+
<ul className='list-disc list-inside ml-6'>
37+
<li>trojan horses</li>
38+
<li>rootkits</li>
39+
<li>backdoors</li>
40+
<li>viruses</li>
4941
</ul>
5042
</li>
5143
<li>
52-
Your code not allowed to:
53-
<ul className='list-disc list-inside'>
54-
<li>access the network;</li>
44+
Your code is not allowed to:
45+
<ul className='list-disc list-inside ml-6'>
46+
<li>access the network</li>
5547
<li>
5648
work with any files except those explicitly specified in the problem
57-
statement;
49+
statement
5850
</li>
59-
<li>attack system security;</li>
60-
<li>execute other programs and create new processes;</li>
61-
<li>change file system permissions;</li>
62-
<li>work with subdirectories;</li>
51+
<li>attack system security</li>
52+
<li>execute other programs and create new processes</li>
53+
<li>change file system permissions</li>
54+
<li>work with subdirectories</li>
6355
<li>
64-
create or manipulate any GUI items (windows, dialog boxes, etc);
56+
create or manipulate any GUI items (windows, dialog boxes, etc)
6557
</li>
66-
<li>work with external devices (sound, printer, etc);</li>
67-
<li>work with OS registry;</li>
68-
<li>do anything else that can stir Polygon functioning.</li>
58+
<li>work with external devices (sound, printer, etc)</li>
59+
<li>work with OS registry</li>
60+
<li>do anything else that can stir Polygon functioning</li>
6961
</ul>
7062
</li>
7163
</ol>
72-
</Typography>
73-
</Box>
74-
</Modal>
64+
</div>
65+
</DialogContent>
66+
</Dialog>
7567
</div>
7668
);
7769
}

0 commit comments

Comments
 (0)