Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix linting errors #16

Merged
merged 1 commit into from
Jul 31, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 1 addition & 5 deletions src/app/register/SubmitBox.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,7 @@
import { FormEvent } from 'react';
import { Box } from '@mui/material';

export default function RegisterSubmitBox({
children,
}: {
children: React.ReactNode;
}) {
export default function RegisterSubmitBox({ children }: { children: React.ReactNode }) {
const handleSubmit = (event: FormEvent<HTMLFormElement>) => {
event.preventDefault();
const data = new FormData(event.currentTarget);
Expand Down
11 changes: 4 additions & 7 deletions src/app/register/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,11 @@ import {
FormControlLabel,
} from '@mui/material';
import { LockOutlined } from '@mui/icons-material';

import RegisterSubmitBox from './SubmitBox';

import Copyright from '@/components/Copyright';
import CustomLink from '@/components/CustomLink';
import RegisterSubmitBox from './SubmitBox';
import TACModal from '@/components/TACModal';

export default function SignUp() {
Expand Down Expand Up @@ -100,12 +102,7 @@ export default function SignUp() {
control={<Checkbox value='allowExtraEmails' color='primary' />}
label='I want to receive inspiration, marketing promotions and updates via email.'
/> */}
<Button
type='submit'
fullWidth
variant='contained'
sx={{ mt: 3, mb: 2 }}
>
<Button type='submit' fullWidth variant='contained' sx={{ mt: 3, mb: 2 }}>
Register
</Button>
<Grid container justifyContent='flex-end'>
Expand Down
22 changes: 8 additions & 14 deletions src/components/TACModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { Box, Button, Modal, Typography } from '@mui/material';
import { useState } from 'react';

const style = {
position: 'absolute' as 'absolute',
position: 'absolute',
top: '50%',
left: '50%',
transform: 'translate(-50%, -50%)',
Expand All @@ -12,7 +12,7 @@ const style = {
border: '2px solid #000',
boxShadow: 24,
p: 4,
};
} as const;

export default function TACModal() {
const [open, setOpen] = useState(false);
Expand All @@ -29,20 +29,15 @@ export default function TACModal() {
aria-describedby='modal-modal-description'
>
<Box sx={style}>
<Typography
id='modal-modal-title'
variant='h6'
component='h2'
align='center'
>
<Typography id='modal-modal-title' variant='h6' component='h2' align='center'>
Terms and Conditions
</Typography>
<Typography id='modal-modal-description' sx={{ mt: 2 }}>
<ol className='list-decimal'>
<li>You can use Polygon to develop problems only.</li>
<li>
You should use your real name and all information about you
should be correct and accurate.
You should use your real name and all information about you should be
correct and accurate.
</li>
<li>
You should not submit files containing malicious code:
Expand All @@ -58,16 +53,15 @@ export default function TACModal() {
<ul className='list-disc list-inside'>
<li>access the network;</li>
<li>
work with any files except those explicitly specified in the
problem statement;
work with any files except those explicitly specified in the problem
statement;
</li>
<li>attack system security;</li>
<li>execute other programs and create new processes;</li>
<li>change file system permissions;</li>
<li>work with subdirectories;</li>
<li>
create or manipulate any GUI items (windows, dialog boxes,
etc);
create or manipulate any GUI items (windows, dialog boxes, etc);
</li>
<li>work with external devices (sound, printer, etc);</li>
<li>work with OS registry;</li>
Expand Down