Skip to content

Commit f5c4a98

Browse files
committed
fix: make 'back' button in articles return to main blog/help page
1 parent 97d9881 commit f5c4a98

File tree

2 files changed

+12
-7
lines changed

2 files changed

+12
-7
lines changed

web/src/app/(content)/(info)/blog/[id]/page.tsx

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
import type { Metadata } from 'next';
22
import Image from 'next/image';
3+
import Link from 'next/link';
34
import { notFound } from 'next/navigation';
45

56
import { PostType, getPostData } from '@web/src/lib/posts';
6-
import BackButton from '@web/src/modules/shared/components/client/BackButton';
77
import { CustomMarkdown } from '@web/src/modules/shared/components/CustomMarkdown';
88

99
type BlogPageProps = {
@@ -45,9 +45,12 @@ const BlogPost = ({ params }: BlogPageProps) => {
4545
return (
4646
<>
4747
<article className='max-w-screen-md mx-auto mb-36'>
48-
<BackButton className='text-zinc-500 hover:text-zinc-400 text-sm'>
49-
{'< Back to Help'}
50-
</BackButton>
48+
<Link
49+
href='/help'
50+
className='text-zinc-500 hover:text-zinc-400 text-sm'
51+
>
52+
{'< Back to Blog'}
53+
</Link>
5154
<h1 className='text-4xl font-bold mt-16 mb-8'>{post.title}</h1>
5255

5356
{/* Author */}

web/src/app/(content)/(info)/help/[id]/page.tsx

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ import Link from 'next/link';
44
import { notFound } from 'next/navigation';
55

66
import { PostType, getPostData } from '@web/src/lib/posts';
7-
import BackButton from '@web/src/modules/shared/components/client/BackButton';
87
import { CustomMarkdown } from '@web/src/modules/shared/components/CustomMarkdown';
98

109
type HelpPageProps = {
@@ -46,9 +45,12 @@ const HelpPost = ({ params }: HelpPageProps) => {
4645
return (
4746
<>
4847
<article className='max-w-screen-md mx-auto mb-36'>
49-
<BackButton className='text-zinc-500 hover:text-zinc-400 text-sm'>
48+
<Link
49+
href='/blog'
50+
className='text-zinc-500 hover:text-zinc-400 text-sm'
51+
>
5052
{'< Back to Help'}
51-
</BackButton>
53+
</Link>
5254
<h1 className='text-4xl font-bold mt-16 mb-8'>{post.title}</h1>
5355

5456
{/* Author */}

0 commit comments

Comments
 (0)