Skip to content

Commit d1aaf19

Browse files
committed
make publication title as link to the page
1 parent 84854a6 commit d1aaf19

File tree

1 file changed

+11
-5
lines changed

1 file changed

+11
-5
lines changed

app/publications/page.tsx

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@ function Links({ paper, code, page }: { paper: string, code: string | null; page
1414
if (code !== null) {
1515
links.push(<Link href={code}>code</Link>)
1616
}
17-
if (page !== null) {
18-
let page_link = "projects/" + page;
19-
links.push(<Link href={page_link}>page</Link>)
20-
}
17+
// if (page !== null) {
18+
// let page_link = "projects/" + page;
19+
// links.push(<Link href={page_link}>page</Link>)
20+
// }
2121
return <>{links.reduce((prev, curr) => <>{prev} / {curr}</>)}</>
2222
}
2323

@@ -44,7 +44,13 @@ export default function PublicationsPage() {
4444
<PublicationTags tags={publication.tags} />
4545
</div>
4646
<div>
47-
<h2 className="font-bold text-xl">{publication.title}</h2>
47+
{publication.page ? (
48+
<Link href={`projects/${publication.page}`}>
49+
<h2 className="font-bold text-xl">{publication.title}</h2>
50+
</Link>
51+
) : (
52+
<h2 className="font-bold text-xl">{publication.title}</h2>
53+
)}
4854
</div>
4955
</div>
5056
<div className="flex flex-col mx-4 my-2">

0 commit comments

Comments
 (0)