mirror of
https://github.com/umami-software/umami.git
synced 2026-02-11 16:17:13 +01:00
Updated login check method.
This commit is contained in:
parent
170b30b391
commit
796c65fa29
10 changed files with 45 additions and 40 deletions
|
|
@ -1,8 +1,8 @@
|
|||
import { useRouter } from 'next/router';
|
||||
import Layout from 'components/layout/Layout';
|
||||
import Dashboard from 'components/pages/Dashboard';
|
||||
import useUser from 'hooks/useUser';
|
||||
import useConfig from 'hooks/useConfig';
|
||||
import useRequireLogin from 'hooks/useRequireLogin';
|
||||
|
||||
export default function DashboardPage() {
|
||||
const {
|
||||
|
|
@ -10,7 +10,7 @@ export default function DashboardPage() {
|
|||
isReady,
|
||||
asPath,
|
||||
} = useRouter();
|
||||
const user = useUser();
|
||||
const { user } = useRequireLogin();
|
||||
const { adminDisabled } = useConfig();
|
||||
|
||||
if (adminDisabled || !user || !isReady) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue