mirror of
https://github.com/aaronpo97/the-biergarten-app.git
synced 2026-02-16 10:42:08 +00:00
Refactor BeerPostHeader, refactor login and register
- Updated BeerPostHeader in /id page to use semantic HTML tags - Removed the getServerSidesProps fn in /login and /register. Moved the redirect logic over to the client, will redirect on the client side. - Added delete BeerPost option on the edit page.
This commit is contained in:
@@ -6,9 +6,11 @@ import Image from 'next/image';
|
||||
import { FaUserCircle } from 'react-icons/fa';
|
||||
import Head from 'next/head';
|
||||
import Link from 'next/link';
|
||||
import redirectIfLoggedIn from '@/getServerSideProps/redirectIfLoggedIn';
|
||||
|
||||
import useRedirectWhenLoggedIn from '@/hooks/useRedirectIfLoggedIn';
|
||||
|
||||
const LoginPage: NextPage = () => {
|
||||
useRedirectWhenLoggedIn();
|
||||
return (
|
||||
<Layout>
|
||||
<Head>
|
||||
@@ -52,8 +54,3 @@ const LoginPage: NextPage = () => {
|
||||
};
|
||||
|
||||
export default LoginPage;
|
||||
|
||||
export const getServerSideProps = redirectIfLoggedIn({
|
||||
destination: '/',
|
||||
permanent: false,
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user