Skip to content

Commit

Permalink
Fix signup page
Browse files Browse the repository at this point in the history
  • Loading branch information
kanatagu committed Mar 2, 2024
1 parent fea2dd3 commit a8cb467
Show file tree
Hide file tree
Showing 9 changed files with 45 additions and 67 deletions.
2 changes: 1 addition & 1 deletion app/(auth)/signin/components/signin-footer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export const SignInFooter = () => {
fontSize="sm"
color="primary.800"
fontWeight="semibold"
href="/signup/email"
href="/signup"
>
Sign Up
</Link>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
'use server'
import { cookies } from 'next/headers'
import { redirect } from 'next/navigation'
import type { SignUpSchema } from '@/(auth)/signup/email/schema'
import type { SignUpSchema } from '@/(auth)/signup/schema'
import { createClient } from '@/(auth)/supabase/with-cookie'

export const signUp = async ({
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,13 @@ export const SignUpFooter = () => {
color="gray.600"
mt={{ base: '38px', md: '32px' }}
>
By signing up, you agree to{' '}
<Link href="/signUp/email" color="primary.800" hasUnderLine={true}>
By signing up, you agree to
{/* TODO Add terms of policy page */}
<Link href="/signUp" color="primary.800" hasUnderLine={true}>
Terms of Service
</Link>{' '}
and{' '}
<Link href="/signUp/email" color="primary.800" hasUnderLine={true}>
and {/* TODO Add terms of privacy policy page */}
<Link href="/signUp" color="primary.800" hasUnderLine={true}>
Privacy Policy
</Link>{' '}
.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ import {
useToast,
useBoolean
} from '@chakra-ui/react'
import { signUp } from '@/(auth)/signup/email/action'
import { signUpResolver, SignUpSchema } from '@/(auth)/signup/email/schema'
import { signUp } from '@/(auth)/signup/action'
import { signUpResolver, SignUpSchema } from '@/(auth)/signup/schema'
import { PrimaryButton } from '@/components/button'
import { InputForm } from '@/components/input'

Expand Down
41 changes: 0 additions & 41 deletions app/(auth)/signup/email/page.tsx

This file was deleted.

54 changes: 36 additions & 18 deletions app/(auth)/signup/page.tsx
Original file line number Diff line number Diff line change
@@ -1,23 +1,41 @@
import { Heading, List, ListItem } from '@chakra-ui/react'
import Link from 'next/link'
import { SecondaryButton } from '@/components/button'
'use client'

import { Box, Card, LightMode } from '@chakra-ui/react'
import {
SignUpHeader,
SignUpForm,
SignUpFooter
} from '@/(auth)/signup/components'

export default function SignUp() {
return (
<>
<Heading>Welcome!</Heading>
<Heading>Create an Account</Heading>
<List spacing={3}>
<ListItem>
<Link href="/signup/email">
<SecondaryButton>Sign up with Email</SecondaryButton>
</Link>
</ListItem>
</List>
<Heading>Already have an account?</Heading>
<Link href="/signin/email">
<SecondaryButton>Sign in to your account?</SecondaryButton>
</Link>
</>
<LightMode>
<Box
as="main"
minH="100vh"
height="100%"
display="flex"
overflowX="hidden"
p={{ base: '0', md: '40px' }}
justifyContent="center"
alignItems="center"
bg={{
base: 'white',
md: 'linear-gradient(242.77deg, #C4E6E6 1.15%, #085783 100%)'
}}
>
<Card
bg="white"
boxShadow={{ base: '0', md: '0 4px 16px rgba(0, 0, 0, 0.1)' }}
maxW={{ base: '100%', md: '542px' }}
py="30px"
px={{ base: '16px', md: '80px' }}
>
<SignUpHeader />
<SignUpForm />
<SignUpFooter />
</Card>
</Box>
</LightMode>
)
}
File renamed without changes.

0 comments on commit a8cb467

Please sign in to comment.