mirror of
https://github.com/umami-software/umami.git
synced 2026-02-04 04:37:11 +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,9 +1,9 @@
|
|||
import Layout from 'components/layout/Layout';
|
||||
import TestConsole from 'components/pages/TestConsole';
|
||||
import useUser from 'hooks/useUser';
|
||||
import useRequireLogin from 'hooks/useRequireLogin';
|
||||
|
||||
export default function ConsolePage({ pageDisabled }) {
|
||||
const user = useUser();
|
||||
const { user } = useRequireLogin();
|
||||
|
||||
if (pageDisabled || !user || !user.isAdmin) {
|
||||
return null;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue