Improving user management and auto-refreshing user firms
This commit is contained in:
@@ -10,13 +10,8 @@ import { useGetIdentity } from "@refinedev/core";
|
||||
import { HamburgerMenu, RefineThemedLayoutV2HeaderProps } from "@refinedev/mui";
|
||||
import React, { useContext } from "react";
|
||||
import { ColorModeContext } from "../../contexts/color-mode";
|
||||
import {Logout} from "../auth/Logout";
|
||||
|
||||
type IUser = {
|
||||
id: number;
|
||||
email: string;
|
||||
avatar: string;
|
||||
};
|
||||
import { Logout } from "../auth/Logout";
|
||||
import { IUser } from "../../interfaces";
|
||||
|
||||
export const Header: React.FC<RefineThemedLayoutV2HeaderProps> = ({
|
||||
sticky = true,
|
||||
@@ -50,7 +45,7 @@ export const Header: React.FC<RefineThemedLayoutV2HeaderProps> = ({
|
||||
{mode === "dark" ? <LightModeOutlined /> : <DarkModeOutlined />}
|
||||
</IconButton>
|
||||
|
||||
{(user?.avatar || user?.email) && (
|
||||
{(user?.email) && (
|
||||
<Stack
|
||||
direction="row"
|
||||
gap="16px"
|
||||
@@ -70,7 +65,7 @@ export const Header: React.FC<RefineThemedLayoutV2HeaderProps> = ({
|
||||
{user?.email}
|
||||
</Typography>
|
||||
)}
|
||||
<Avatar src={user?.avatar} alt={user?.email} />
|
||||
<Avatar src={"user?.avatar"} alt={user?.email} />
|
||||
<Logout />
|
||||
</Stack>
|
||||
)}
|
||||
|
||||
Reference in New Issue
Block a user