Skip to content

Commit

Permalink
fix publication typing
Browse files Browse the repository at this point in the history
  • Loading branch information
Boltzmachine committed Dec 31, 2024
1 parent 4637066 commit c43d7ea
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
5 changes: 3 additions & 2 deletions app/publications/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import { Link } from "@nextui-org/link";
import { useSearchParams } from "next/navigation";

import { publications } from "@/config/publications";
import { publications, Tag } from "@/config/publications";
import { PublicationTags } from "@/components/tag";

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

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

if (direction !== null) {
publications_filtered = publications.filter((publication) =>
publication.tags.includes(direction as any),
publication.tags.includes(direction_tag),
);
}

Expand Down
4 changes: 3 additions & 1 deletion config/publications.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,12 @@ export interface Publication {
page: string | null;
paper: string;
code: string | null;
abstract: string;
impact: string;
tags: Tag[];
}

export const publications = [
export const publications: Publication[] = [
{
title: "Lorentzian Residual Neural Networks",
authors: "Neil He, Menglin Yang, Rex Ying",
Expand Down

0 comments on commit c43d7ea

Please sign in to comment.