mirror of
https://github.com/umami-software/umami.git
synced 2026-02-12 16:45:35 +01:00
Use context hooks.
This commit is contained in:
parent
00adb00d2d
commit
600a3d28c3
13 changed files with 46 additions and 44 deletions
|
|
@ -1,10 +1,9 @@
|
|||
import { useContext } from 'react';
|
||||
import { User } from '@/components/icons';
|
||||
import { PageHeader } from '@/components/common/PageHeader';
|
||||
import { UserContext } from '@/app/(main)/admin/users/[userId]/UserProvider';
|
||||
import { useUser } from '@/components/hooks';
|
||||
|
||||
export function UserHeader() {
|
||||
const user = useContext(UserContext);
|
||||
const user = useUser();
|
||||
|
||||
return <PageHeader title={user?.username} icon={<User />} />;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue