feat: Refresh token on load and user information added

This commit is contained in:
مهرزاد قدرتی
2025-08-17 13:00:25 +03:30
parent dd6e2fdd0d
commit 3410c52656
13 changed files with 137 additions and 47 deletions

View File

@@ -8,13 +8,13 @@ import {
import { Icon } from '@rkheftan/harmony-ui';
import { HambergerMenu, Menu } from 'iconsax-react';
import type { Dispatch, SetStateAction } from 'react';
import type { User } from './type';
import type { UserInfo } from '@/contexts/AuthContext';
interface ToolbarProps {
sideNavOpen: boolean;
setSideNavOpen: Dispatch<SetStateAction<boolean>>;
isMobile: boolean;
user: User;
user: UserInfo;
}
export const Toolbar: React.FC<ToolbarProps> = ({
@@ -61,7 +61,7 @@ export const Toolbar: React.FC<ToolbarProps> = ({
{isMobile && (
<Avatar
sx={{ width: 32, height: 32, fontSize: '14px' }}
src={user.profileUrl}
src={user.picture}
>
{user.firstName.charAt(0) + ' ' + user.lastName.charAt(0)}
</Avatar>