Skip to content

Commit

Permalink
refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
RUNFUNRUN committed Dec 6, 2024
1 parent 80c9485 commit 569c6d6
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 43 deletions.
82 changes: 40 additions & 42 deletions src/app/(home)/contact/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,49 +32,47 @@ const Page = () => {
};

return (
<>
<CardContent className='sm:max-w-[600px]'>
<CardHeader className='grid gap-2 px-0 text-lg'>
<CardTitle className='flex justify-between'>
<span>Contact form</span>
<Link href='/' className='underline'>
Go home
</Link>
</CardTitle>
<CardDescription className='text-left'>
If you would like a reply, please enter your email address.
<br /> If not, it’s not required.
</CardDescription>
</CardHeader>
<form action={formAction}>
<div className='grid gap-4'>
<div className='space-y-1'>
<Label htmlFor='name'>
Name
<span className='ml-1 text-muted-foreground'>(required)</span>
</Label>
<Input id='name' name='name' required />
</div>
<div className='space-y-1'>
<Label htmlFor='email'>E-mail</Label>
<Input id='email' name='email' type='email' />
</div>
<div className='space-y-1'>
<Label htmlFor='content'>
Content
<span className='ml-1 text-muted-foreground'>(required)</span>
</Label>
<Textarea id='content' name='content' rows={5} required />
</div>
<CardContent className='sm:max-w-[600px]'>
<CardHeader className='grid gap-2 px-0 text-lg'>
<CardTitle className='flex justify-between'>
<span>Contact form</span>
<Link href='/' className='underline'>
Go home
</Link>
</CardTitle>
<CardDescription className='text-left'>
If you would like a reply, please enter your email address.
<br /> If not, it’s not required.
</CardDescription>
</CardHeader>
<form action={formAction}>
<div className='grid gap-4'>
<div className='space-y-1'>
<Label htmlFor='name'>
Name
<span className='ml-1 text-muted-foreground'>(required)</span>
</Label>
<Input id='name' name='name' required />
</div>
<CardFooter className='mt-6 p-0 sm:justify-end'>
<Button type='submit' className='w-full sm:w-28'>
Submit
</Button>
</CardFooter>
</form>
</CardContent>
</>
<div className='space-y-1'>
<Label htmlFor='email'>E-mail</Label>
<Input id='email' name='email' type='email' />
</div>
<div className='space-y-1'>
<Label htmlFor='content'>
Content
<span className='ml-1 text-muted-foreground'>(required)</span>
</Label>
<Textarea id='content' name='content' rows={5} required />
</div>
</div>
<CardFooter className='mt-6 p-0 sm:justify-end'>
<Button type='submit' className='w-full sm:w-28'>
Submit
</Button>
</CardFooter>
</form>
</CardContent>
);
};

Expand Down
2 changes: 1 addition & 1 deletion src/app/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ const RootLayout = ({
export default RootLayout;

const title = 'RUNFUNRUN';
const description = 'My portfolio';
const description = 'This is my portfolio';

export const metadata: Metadata = {
metadataBase: new URL(
Expand Down

0 comments on commit 569c6d6

Please sign in to comment.