File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -9,6 +9,7 @@ import { useAppDispatch } from 'src/app/hooks';
99import { toggleSidebar } from 'src/features/navigation/navigationSlice' ;
1010import { ReactComponent as MenuIcon } from 'src/assets/icons/menu-stroke.svg' ;
1111import styled from 'styled-components' ;
12+ import { useNavigate } from 'react-router-dom' ;
1213import { WorkspacesDropdown } from './workspaceDropdown' ;
1314
1415export const LogoIconContainer = styled ( HeaderItem ) `
@@ -36,10 +37,16 @@ const MenuItem = styled(HeaderItem)`
3637export const BrandLogo = ( ) => {
3738 const { t } = useTranslation ( ) ;
3839 const dispatch = useAppDispatch ( ) ;
40+ const navigate = useNavigate ( ) ;
3941
4042 const toggleSidebarState = ( ) => {
4143 dispatch ( toggleSidebar ( ) ) ;
4244 } ;
45+
46+ const handleLogoClick = ( ) => {
47+ navigate ( '/' ) ; // Navigate to the root route
48+ } ;
49+
4350 return (
4451 < >
4552 < MenuItem onClick = { toggleSidebarState } >
@@ -51,7 +58,7 @@ export const BrandLogo = () => {
5158 </ HeaderItemText >
5259 </ MenuItem >
5360 < LogoIconContainer hasLogo >
54- < HeaderItemIcon >
61+ < HeaderItemIcon onClick = { handleLogoClick } >
5562 < Logo type = "icon" size = { 150 } />
5663 </ HeaderItemIcon >
5764 </ LogoIconContainer >
You can’t perform that action at this time.
0 commit comments