fix(qr): guest menu 500 (SSR) + remove café discovery from owner panel

1. The /q/{code} guest menu returned HTTP 500 on every load. Root cause:
   menu-item-model-viewer.tsx did a top-level `import "@google/model-viewer"`,
   a browser-only lib that touches `self` at module evaluation. Next pulled
   it into the server module graph (page → qr-guest-menu → qr-menu-3d-sheet →
   model-viewer) and SSR crashed with "self is not defined". Now the library
   is imported lazily inside useEffect (client-only); a poster placeholder
   shows until the custom element registers. Verified /q/* now returns 200.

2. Removed the "discover" (browse other cafés) item from the café owner
   sidebar — café discovery belongs in Koja, not the owner panel. The owner
   still manages their OWN Koja listing from Settings.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
soroush.asadi
2026-06-15 15:08:48 +03:30
parent 9765491f6f
commit 76d4434581
2 changed files with 47 additions and 4 deletions
+2 -3
View File
@@ -21,7 +21,6 @@ import {
Wallet,
Clock,
LifeBuoy,
Compass,
} from "lucide-react";
export type NavGroupId = "main" | "customers" | "management";
@@ -39,7 +38,6 @@ export type NavItemKey =
| "coupons"
| "sms"
| "reviews"
| "discover"
| "inventory"
| "expenses"
| "shifts"
@@ -93,7 +91,8 @@ export const NAV_GROUPS: NavGroupDef[] = [
{ key: "coupons", href: "/coupons", icon: Ticket },
{ key: "sms", href: "/sms", icon: MessageSquare },
{ key: "reviews", href: "/reviews", icon: Star },
{ key: "discover", href: "/discover", icon: Compass },
// NOTE: café discovery (browsing other cafés) lives in Koja, not the owner
// panel. The owner manages their OWN Koja listing from Settings.
],
},
{