Skip to content

Fix Modal Navigation #5

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

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
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
2 changes: 1 addition & 1 deletion src/app/@authModal/(.)sign-in/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ const page: FC = () => {
<CloseModal />
</div>

<SignIn />
<SignIn isModal={true} />
</div>
</div>
</div>
Expand Down
2 changes: 1 addition & 1 deletion src/app/@authModal/(.)sign-up/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ const page: FC<pageProps> = ({}) => {
<CloseModal />
</div>

<SignUp />
<SignUp isModal={true} />
</div>
</div>
</div>
Expand Down
13 changes: 11 additions & 2 deletions src/components/SignIn.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,15 @@
"use client";

import { FC } from 'react'
import { Icons } from '@/components/Icons'
import UserAuthForm from '@/components/UserAuthForm'
import Link from 'next/link'

const SignIn = () => {
interface SignInProps {
isModal?: boolean;
}

const SignIn: FC<SignInProps> = ({ isModal = false }) => {
return (
<div className='container mx-auto flex w-full flex-col justify-center space-y-6 sm:w-[400px]'>
<div className='flex flex-col space-y-2 text-center'>
Expand All @@ -18,7 +25,9 @@ const SignIn = () => {
New to Breaddit?{' '}
<Link
href='/sign-up'
className='hover:text-brand text-sm underline underline-offset-4'>
className='hover:text-brand text-sm underline underline-offset-4'
replace={isModal}
}>
Sign Up
</Link>
</p>
Expand Down
41 changes: 25 additions & 16 deletions src/components/SignUp.tsx
Original file line number Diff line number Diff line change
@@ -1,29 +1,38 @@
import { Icons } from '@/components/Icons'
import UserAuthForm from '@/components/UserAuthForm'
import Link from 'next/link'
"use client";

const SignUp = () => {
import { FC } from "react";
import { Icons } from "@/components/Icons";
import UserAuthForm from "@/components/UserAuthForm";
import Link from "next/link";

interface SignUpProps {
isModal?: boolean;
}

const SignUp: Fc<SignUpProps> = ({ isModal = false }) => {
return (
<div className='container mx-auto flex w-full flex-col justify-center space-y-6 sm:w-[400px]'>
<div className='flex flex-col space-y-2 text-center'>
<Icons.logo className='mx-auto h-6 w-6' />
<h1 className='text-2xl font-semibold tracking-tight'>Sign Up</h1>
<p className='text-sm max-w-xs mx-auto'>
<div className="container mx-auto flex w-full flex-col justify-center space-y-6 sm:w-[400px]">
<div className="flex flex-col space-y-2 text-center">
<Icons.logo className="mx-auto h-6 w-6" />
<h1 className="text-2xl font-semibold tracking-tight">Sign Up</h1>
<p className="text-sm max-w-xs mx-auto">
By continuing, you are setting up a Breadit account and agree to our
User Agreement and Privacy Policy.
</p>
</div>
<UserAuthForm />
<p className='px-8 text-center text-sm text-muted-foreground'>
Already a Breadditor?{' '}
<p className="px-8 text-center text-sm text-muted-foreground">
Already a Breadditor?{" "}
<Link
href='/sign-in'
className='hover:text-brand text-sm underline underline-offset-4'>
href="/sign-in"
className="hover:text-brand text-sm underline underline-offset-4"
replace={isModal}
>
Sign in
</Link>
</p>
</div>
)
}
);
};

export default SignUp
export default SignUp;