Skip to content

The Open Source DocuSign Alternative.

chore: custom command menu shortcut text for macOS (#657)

Ephraim Atta-Duncancebdf5fd8e3e
diff --git a/apps/web/src/components/(dashboard)/layout/desktop-nav.tsx b/apps/web/src/components/(dashboard)/layout/desktop-nav.tsx
index a32d1b82a..a78c69704 100644
--- a/apps/web/src/components/(dashboard)/layout/desktop-nav.tsx
+++ b/apps/web/src/components/(dashboard)/layout/desktop-nav.tsx
@@ -1,6 +1,7 @@
'use client';
-import { HTMLAttributes, useState } from 'react';
+import type { HTMLAttributes } from 'react';
+import { useState } from 'react';
import { Search } from 'lucide-react';
@@ -15,6 +16,9 @@ export const DesktopNav = ({ className, ...props }: DesktopNavProps) => {
// const pathname = usePathname();
const [open, setOpen] = useState(false);
+ const isMacOS = /Macintosh|Mac\s+OS\s+X/i.test(navigator?.userAgent || 'unknown');
+ const modifierKey = isMacOS ? '⌘' : 'Ctrl';
+
return (
<div
className={cn('ml-8 hidden flex-1 gap-x-6 md:flex md:justify-center', className)}
@@ -34,7 +38,7 @@ export const DesktopNav = ({ className, ...props }: DesktopNavProps) => {
<div>
<div className="text-muted-foreground bg-muted rounded-md px-1.5 py-0.5 font-mono text-xs">
- Ctrl+K
+ {modifierKey}+K
</div>
</div>
</Button>