Skip to content

Commit c43d7ea

Browse files
committed
fix publication typing
1 parent 4637066 commit c43d7ea

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

app/publications/page.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
import { Link } from "@nextui-org/link";
44
import { useSearchParams } from "next/navigation";
55

6-
import { publications } from "@/config/publications";
6+
import { publications, Tag } from "@/config/publications";
77
import { PublicationTags } from "@/components/tag";
88

99
function Links({ paper, code, page }: { paper: string, code: string | null; page: string | null }) {
@@ -21,11 +21,12 @@ export default function PublicationsPage() {
2121
const searchParams = useSearchParams();
2222

2323
const direction = searchParams.get("tag");
24+
const direction_tag = Tag[direction as keyof typeof Tag];
2425
let publications_filtered = publications;
2526

2627
if (direction !== null) {
2728
publications_filtered = publications.filter((publication) =>
28-
publication.tags.includes(direction as any),
29+
publication.tags.includes(direction_tag),
2930
);
3031
}
3132

config/publications.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,12 @@ export interface Publication {
1212
page: string | null;
1313
paper: string;
1414
code: string | null;
15+
abstract: string;
16+
impact: string;
1517
tags: Tag[];
1618
}
1719

18-
export const publications = [
20+
export const publications: Publication[] = [
1921
{
2022
title: "Lorentzian Residual Neural Networks",
2123
authors: "Neil He, Menglin Yang, Rex Ying",

0 commit comments

Comments
 (0)