mirror of
https://github.com/umami-software/umami.git
synced 2026-02-18 11:35:37 +01:00
autologin as separate component
This commit is contained in:
parent
6bd01aaa45
commit
e849d55b3f
3 changed files with 30 additions and 16 deletions
|
|
@ -1,13 +1,17 @@
|
|||
import React from 'react';
|
||||
import Layout from 'components/layout/Layout';
|
||||
import LoginForm from 'components/forms/LoginForm';
|
||||
import AutoLogin from 'components/forms/AutoLogin';
|
||||
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>
|
||||
<LoginForm hash={query.hash} />
|
||||
<LoginForm />
|
||||
</Layout>
|
||||
);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue