fix: redirect owner profile link to shop page instead of user page

This commit is contained in:
zetaloop
2026-02-20 22:36:34 +08:00
parent 3a12b97ecb
commit c0896faa78
+3 -1
View File
@@ -29,7 +29,7 @@ import {
} from "@/components/ui/dropdown-menu"
import { Input } from "@/components/ui/input"
import { Sheet, SheetContent, SheetHeader, SheetTitle, SheetTrigger } from "@/components/ui/sheet"
import { currentUser, mockNotifications } from "@/lib/mock-data"
import { currentUser, mockNotifications, mockShops } from "@/lib/mock-data"
import type { UserRole } from "@/lib/types"
import { cn } from "@/lib/utils"
import { useAuthStore } from "@/store/auth"
@@ -147,6 +147,8 @@ export function Header() {
href={
currentRole === "player"
? `/player/${currentUser.id}`
: currentRole === "owner"
? `/shop/${mockShops.find((s) => s.owner.id === currentUser.id)?.id ?? "shop1"}`
: `/user/${currentUser.id}`
}
>