Skip to content

Commit

Permalink
Fixed create project button keyboard accesibility
Browse files Browse the repository at this point in the history
  • Loading branch information
hemantwasthere committed Oct 24, 2023
1 parent e992130 commit c693146
Showing 1 changed file with 10 additions and 12 deletions.
22 changes: 10 additions & 12 deletions components/Dashboard/ProjectSwitch.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ import {
PopoverTrigger,
} from '@/components/ui/popover'
import { useSelectedProject, useUserProjects } from '@/hooks/query/project'
import { useProjectModal } from '@/store/useProjectModal'
import { cn } from '@/lib/utils'
import { useProjectModal } from '@/store/useProjectModal'

const ProjectSwitch: React.FC = () => {
const { projects } = useUserProjects()
Expand Down Expand Up @@ -79,18 +79,16 @@ const ProjectSwitch: React.FC = () => {
</CommandGroup>
</CommandList>
<CommandSeparator />
<CommandList>
<CommandGroup>
<Button
className="flex h-full w-full justify-start px-2 py-1.5 font-normal hover:bg-primary/80"
onClick={() => projectModal.openCreateProjectModal()}
>
<PlusCircle className="mr-2 h-5 w-5" />
Create Project
</Button>
</CommandGroup>
</CommandList>
</Command>
<div className="p-1">
<Button
className="flex h-full w-full justify-start px-2 py-1.5 font-normal hover:bg-primary/80"
onClick={() => projectModal.openCreateProjectModal()}
>
<PlusCircle className="mr-2 h-5 w-5" />
Create Project
</Button>
</div>
</PopoverContent>
</Popover>
)
Expand Down

0 comments on commit c693146

Please sign in to comment.