using constants to define header/footer appearence

This commit is contained in:
Dario Guarascio 2021-10-12 22:46:55 +02:00
parent 00adf86fa8
commit cdb77f1be1
5 changed files with 20 additions and 9 deletions

View file

@ -7,11 +7,16 @@ import { useRouter } from 'next/router';
export default function LoginPage() {
const { query } = useRouter();
if (query.hash) {
return <AutoLogin hash={query.hash} />;
return (
<Layout title="login" header={false} footer={false} center>
<AutoLogin hash={query.hash} />
</Layout>
);
} else {
return (
<Layout title="login" header={false} footer={false} center>
<LoginForm />
</Layout>
);
}
return (
<Layout title="login" header={false} footer={false} center>
<LoginForm />
</Layout>
);
}