Skip to content

Commit ccc45b8

Browse files
committed
fix: back button and responsive design on post
1 parent ef78a53 commit ccc45b8

File tree

1 file changed

+19
-13
lines changed

1 file changed

+19
-13
lines changed

src/app/~/[slug]/page.tsx

Lines changed: 19 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,12 @@ export default async function Post(props: Params) {
2929
<Portal>
3030
<ReadingTimeProgressBar />
3131
</Portal>
32-
<VStack as="article" alignItems={"start"} py={{ base: "3rem" }} w="100%">
32+
<VStack
33+
as="article"
34+
alignItems={"start"}
35+
py={{ base: "1rem", lg: "3rem" }}
36+
w="100%"
37+
>
3338
<PostHeader
3439
_heading={{
3540
fontSize: { base: "2xl", lg: "5xl" },
@@ -39,19 +44,20 @@ export default async function Post(props: Params) {
3944
{...post}
4045
/>
4146
<PostBody content={post.content || ""} />
42-
<IconButton
43-
position="fixed"
44-
left="1rem"
45-
top="1rem"
46-
asChild
47-
rounded="full"
48-
variant="subtle"
49-
>
50-
<Link href="/~/">
51-
<FiArrowLeft />
52-
</Link>
53-
</IconButton>
5447
</VStack>
48+
<IconButton
49+
position="fixed"
50+
left={{ base: "unset", lg: "1rem" }}
51+
right={{ base: "1rem", lg: "unset" }}
52+
top="1rem"
53+
asChild
54+
rounded="full"
55+
variant="subtle"
56+
>
57+
<Link href="/~/">
58+
<FiArrowLeft />
59+
</Link>
60+
</IconButton>
5561
</>
5662
);
5763
}

0 commit comments

Comments
 (0)