Improving user management and auto-refreshing user firms

This commit is contained in:
2025-04-10 01:31:37 +02:00
parent bc059de65b
commit f1fe81a146
13 changed files with 131 additions and 67 deletions

View File

@@ -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>
)}