Skip to content

Commit

Permalink
fix: hide 'Settings' options from Footer menu
Browse files Browse the repository at this point in the history
  • Loading branch information
yjane99 committed Jan 25, 2024
1 parent bd03e2c commit 5366714
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion raven-app/src/components/layout/Settings/Sidebar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export const Sidebar = (props: Props) => {
</Box>
<SidebarBody />
</Flex>
<SidebarFooter />
<SidebarFooter isSettingsPage />
</Flex>
)
}
6 changes: 3 additions & 3 deletions raven-app/src/components/layout/Sidebar/SidebarFooter.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { BiDotsHorizontalRounded } from 'react-icons/bi'
import { UserAvatar } from '@/components/common/UserAvatar'
import { isSystemManager } from '@/utils/roles'

export const SidebarFooter = () => {
export const SidebarFooter = ({ isSettingsPage = false }: { isSettingsPage?: boolean }) => {

const userData = useUserData()
const { logout } = useContext(UserContext)
Expand Down Expand Up @@ -57,11 +57,11 @@ export const SidebarFooter = () => {
Mobile App
</Link>
</DropdownMenu.Item>
<DropdownMenu.Item color='gray' className='group'>
{!isSettingsPage && <DropdownMenu.Item color='gray' className='group'>
<Link href="../settings" className='no-underline'>
Settings
</Link>
</DropdownMenu.Item>
</DropdownMenu.Item>}
<DropdownMenu.Item onClick={logout} color='red' className='cursor-pointer'>
Log Out
</DropdownMenu.Item>
Expand Down

0 comments on commit 5366714

Please sign in to comment.