refactor(sidebar): reorder workspace navigation items
This commit is contained in:
@@ -24,43 +24,43 @@ export const Sidebar = ({ mobileOpen = false, onMobileClose }: SidebarProps) =>
|
|||||||
const [isCollapsed, setIsCollapsed] = useState(false);
|
const [isCollapsed, setIsCollapsed] = useState(false);
|
||||||
|
|
||||||
const { t, lang } = useTranslation();
|
const { t, lang } = useTranslation();
|
||||||
const isRtl = lang === 'fa';
|
const isRtl = lang === 'fa';
|
||||||
|
|
||||||
const ToggleIcon = isRtl
|
const ToggleIcon = isRtl
|
||||||
? (isCollapsed ? PanelRightOpen : PanelRightClose)
|
? (isCollapsed ? PanelRightOpen : PanelRightClose)
|
||||||
: (isCollapsed ? PanelLeftOpen : PanelLeftClose);
|
: (isCollapsed ? PanelLeftOpen : PanelLeftClose);
|
||||||
|
|
||||||
const navItems = [
|
const navItems = [
|
||||||
{
|
{
|
||||||
path: '/timesheet',
|
path: '/timesheet',
|
||||||
icon: Clock3,
|
icon: Clock3,
|
||||||
label: t.sidebar?.timesheet || 'Timesheet'
|
label: t.sidebar?.timesheet || 'Timesheet'
|
||||||
},
|
},
|
||||||
{
|
|
||||||
path: '/reports',
|
|
||||||
icon: ChartColumn,
|
|
||||||
label: t.sidebar?.reports || 'Reports'
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
path: '/tags',
|
path: '/tags',
|
||||||
icon: Tags,
|
icon: Tags,
|
||||||
label: t.sidebar?.tags || 'Tags'
|
label: t.sidebar?.tags || 'Tags'
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
path: '/clients',
|
||||||
|
icon: Users,
|
||||||
|
label: t.sidebar?.clients || 'Clients'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: '/projects',
|
||||||
|
icon: Briefcase,
|
||||||
|
label: t.sidebar?.projects || 'Projects'
|
||||||
|
},
|
||||||
{
|
{
|
||||||
path: '/workspaces',
|
path: '/workspaces',
|
||||||
icon: LayoutDashboard,
|
icon: LayoutDashboard,
|
||||||
label: t.sidebar?.workspaces || 'Workspaces'
|
label: t.sidebar?.workspaces || 'Workspaces'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: '/clients',
|
path: '/reports',
|
||||||
icon: Users,
|
icon: ChartColumn,
|
||||||
label: t.sidebar?.clients || 'Clients'
|
label: t.sidebar?.reports || 'Reports'
|
||||||
},
|
},
|
||||||
{
|
|
||||||
path: '/projects',
|
|
||||||
icon: Briefcase,
|
|
||||||
label: t.sidebar?.projects || 'Projects'
|
|
||||||
},
|
|
||||||
];
|
];
|
||||||
|
|
||||||
const renderNavItems = (mobile = false) =>
|
const renderNavItems = (mobile = false) =>
|
||||||
|
|||||||
Reference in New Issue
Block a user