-
Notifications
You must be signed in to change notification settings - Fork 84
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
4b64266
commit 9c15ec1
Showing
11 changed files
with
425 additions
and
246 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
import { Outlet, Link, useLocation } from 'react-router-dom'; | ||
import { Logo } from '../components/Logo'; | ||
|
||
const AuthLayout = () => { | ||
const location = useLocation(); | ||
const isLoginPage = location.pathname === '/login'; | ||
|
||
return ( | ||
<div className='min-h-screen flex flex-col justify-center items-center space-y-6'> | ||
<Logo /> | ||
<div className='w-full max-w-md px-8 py-10 bg-white rounded-lg border flex flex-col space-y-6 items-center animate-fadeIn'> | ||
<div className='w-full max-w-sm mx-auto'> | ||
<Outlet /> | ||
</div> | ||
<div className='text-center'> | ||
{isLoginPage ? ( | ||
<div> | ||
<span className='text-gray-500'>Don't have an account?</span>{' '} | ||
<Link to='/register' className=' font-bold'> | ||
Register here. | ||
</Link> | ||
</div> | ||
) : ( | ||
<div> | ||
<span className='text-gray-500'>Already have an account?</span>{' '} | ||
<Link to='/login' className=' font-bold'> | ||
Login here. | ||
</Link> | ||
</div> | ||
)} | ||
</div> | ||
</div> | ||
<div className='animate-fadeIn flex flex-col items-center gap-2 text-center '> | ||
<span className='text-xs text-gray-800'>Powered By</span> | ||
<img | ||
src='https://s3.us-east-2.amazonaws.com/assets.public.serverless/general/framework-text-lighting-icon-center-black.svg' | ||
alt='Serverless Framework' | ||
className='h-8 p-0 m-0' | ||
/> | ||
</div> | ||
</div> | ||
); | ||
}; | ||
|
||
export default AuthLayout; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.