mirror of
https://github.com/umami-software/umami.git
synced 2025-12-08 05:12:36 +01:00
Updated login and layout pages.
This commit is contained in:
parent
9d967fb0fe
commit
4f15c4f146
18 changed files with 103 additions and 106 deletions
|
|
@ -1,27 +1,10 @@
|
|||
import { useRouter } from 'next/router';
|
||||
import Layout from 'components/layout/Layout';
|
||||
import AppLayout from 'components/layout/AppLayout';
|
||||
import Dashboard from 'components/pages/dashboard/Dashboard';
|
||||
import useConfig from 'hooks/useConfig';
|
||||
import useRequireLogin from 'hooks/useRequireLogin';
|
||||
|
||||
export default function DashboardPage() {
|
||||
const {
|
||||
query: { id },
|
||||
isReady,
|
||||
asPath,
|
||||
} = useRouter();
|
||||
const { user } = useRequireLogin();
|
||||
const { adminDisabled } = useConfig();
|
||||
|
||||
if (adminDisabled || !user || !isReady) {
|
||||
return null;
|
||||
}
|
||||
|
||||
const userId = id?.[0];
|
||||
|
||||
return (
|
||||
<Layout>
|
||||
<Dashboard key={asPath} userId={user.id || userId} />
|
||||
</Layout>
|
||||
<AppLayout>
|
||||
<Dashboard />
|
||||
</AppLayout>
|
||||
);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue