Skip to content

Commit 06d80f4

Browse files
committed
fix: show back button on detail pages
1 parent bfe12f0 commit 06d80f4

2 files changed

Lines changed: 12 additions & 10 deletions

File tree

src/app/art/[id]/page.tsx

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
import { useState } from "react";
44

55
import { useQuery } from "@tanstack/react-query";
6+
import { ChevronLeft } from "lucide-react";
67
import { useParams, useRouter } from "next/navigation";
78

89
import ExpandableText from "@/components/archive-detail/ExpandableText";
@@ -12,8 +13,8 @@ import RegionText from "@/components/archive-detail/RegionText";
1213
import SizeText from "@/components/archive-detail/SizeText";
1314
import { useCreateChatRoom } from "@/hooks/useCreateChatRoom";
1415
import { getArtworkDetail } from "@/services/artworks";
15-
import { normalizeImageUrl } from "@/utils/normalizeImageUrl";
1616
import { useAuthStore } from "@/stores/useAuthStore";
17+
import { normalizeImageUrl } from "@/utils/normalizeImageUrl";
1718

1819
function formatDate(date: string | null) {
1920
if (!date) return "-";
@@ -75,14 +76,14 @@ export default function ArtDetailPage() {
7576

7677
return (
7778
<div className="min-h-screen bg-white pb-32">
78-
<header className="fixed top-0 right-0 left-0 z-50 flex h-15 w-full min-w-[320px] px-4">
79-
<div className="flex items-center">
79+
<header className="pointer-events-none fixed top-0 right-0 left-0 z-50 h-15 min-w-[320px]">
80+
<div className="mx-auto flex h-full w-full max-w-97.5 items-center px-4">
8081
<button
8182
aria-label="뒤로가기"
8283
onClick={() => router.back()}
83-
className="flex cursor-pointer items-center font-bold text-white drop-shadow-md"
84+
className="pointer-events-auto -ml-2 flex h-11 w-11 cursor-pointer items-center justify-center rounded-full text-white drop-shadow-[0_1px_2px_rgba(0,0,0,0.55)]"
8485
>
85-
86+
<ChevronLeft size={28} strokeWidth={2.5} />
8687
</button>
8788
</div>
8889
</header>

src/app/space/[id]/page.tsx

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
import { useState } from "react";
44

55
import { useQuery } from "@tanstack/react-query";
6+
import { ChevronLeft } from "lucide-react";
67
import { useParams, useRouter } from "next/navigation";
78

89
import ExpandableText from "@/components/archive-detail/ExpandableText";
@@ -11,8 +12,8 @@ import NicknameCard from "@/components/archive-detail/NicknameCard";
1112
import SizeText from "@/components/archive-detail/SizeText";
1213
import { useCreateChatRoom } from "@/hooks/useCreateChatRoom";
1314
import { getSpaceDetail } from "@/services/spaces";
14-
import { normalizeImageUrl } from "@/utils/normalizeImageUrl";
1515
import { useAuthStore } from "@/stores/useAuthStore";
16+
import { normalizeImageUrl } from "@/utils/normalizeImageUrl";
1617

1718
function hasText(value?: string | null) {
1819
return Boolean(value?.trim());
@@ -70,14 +71,14 @@ export default function SpaceDetailPage() {
7071

7172
return (
7273
<div className="min-h-screen bg-white pb-32">
73-
<header className="fixed top-0 right-0 left-0 z-50 flex h-15 w-full min-w-[320px] px-4">
74-
<div className="flex items-center">
74+
<header className="pointer-events-none fixed top-0 right-0 left-0 z-50 h-15 min-w-[320px]">
75+
<div className="mx-auto flex h-full w-full max-w-97.5 items-center px-4">
7576
<button
7677
aria-label="뒤로가기"
7778
onClick={() => router.back()}
78-
className="flex cursor-pointer items-center font-bold text-white drop-shadow-md"
79+
className="pointer-events-auto -ml-2 flex h-11 w-11 cursor-pointer items-center justify-center rounded-full text-white drop-shadow-[0_1px_2px_rgba(0,0,0,0.55)]"
7980
>
80-
81+
<ChevronLeft size={28} strokeWidth={2.5} />
8182
</button>
8283
</div>
8384
</header>

0 commit comments

Comments
 (0)