fix: redirect owner profile link to shop page instead of user page
This commit is contained in:
@@ -29,7 +29,7 @@ import {
|
|||||||
} from "@/components/ui/dropdown-menu"
|
} from "@/components/ui/dropdown-menu"
|
||||||
import { Input } from "@/components/ui/input"
|
import { Input } from "@/components/ui/input"
|
||||||
import { Sheet, SheetContent, SheetHeader, SheetTitle, SheetTrigger } from "@/components/ui/sheet"
|
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 type { UserRole } from "@/lib/types"
|
||||||
import { cn } from "@/lib/utils"
|
import { cn } from "@/lib/utils"
|
||||||
import { useAuthStore } from "@/store/auth"
|
import { useAuthStore } from "@/store/auth"
|
||||||
@@ -147,7 +147,9 @@ export function Header() {
|
|||||||
href={
|
href={
|
||||||
currentRole === "player"
|
currentRole === "player"
|
||||||
? `/player/${currentUser.id}`
|
? `/player/${currentUser.id}`
|
||||||
: `/user/${currentUser.id}`
|
: currentRole === "owner"
|
||||||
|
? `/shop/${mockShops.find((s) => s.owner.id === currentUser.id)?.id ?? "shop1"}`
|
||||||
|
: `/user/${currentUser.id}`
|
||||||
}
|
}
|
||||||
>
|
>
|
||||||
<User className="mr-2 h-4 w-4" />
|
<User className="mr-2 h-4 w-4" />
|
||||||
|
|||||||
Reference in New Issue
Block a user