Skip to content

Commit

Permalink
Merge pull request piyushgarg-dev#262 from tanpreetjolly/logout-butto…
Browse files Browse the repository at this point in the history
…n-icon

feat: logout icon added to navbar button and mobile view adjusted
  • Loading branch information
hemantwasthere authored Oct 28, 2023
2 parents d0e04c4 + 444a1f8 commit 55fe12e
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions components/Dashboard/DashboardNavbar/index.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { useRouter } from 'next/navigation'

import { LogOut } from 'lucide-react'
import DashboardMobileSidebar from '@/components/Dashboard/DashboardMobileSidebar'
import ProjectSwitch from '@/components/Dashboard/ProjectSwitch'
import { ThemeToggle } from '@/components/ThemeToggle'
Expand All @@ -20,7 +20,10 @@ const DashboardNavbar: React.FC = () => {
<div className="ml-auto flex items-center gap-2 sm:gap-4">
<ThemeToggle />
{user ? (
<Button onClick={signOut}>Logout</Button>
<Button onClick={signOut} className='flex gap-1.5'>
<span className='hidden sm:block'>Logout</span>
<LogOut size={17}/>
</Button>
) : (
<Button onClick={() => router.push('/signin')} className="">
Login
Expand Down

0 comments on commit 55fe12e

Please sign in to comment.