fix: fix research fetch content (#445)

This commit is contained in:
Kalidou Diagne
2025-06-10 21:37:04 +08:00
committed by GitHub
parent 8bbf6ce804
commit 9b9f27377b

View File

@@ -4,8 +4,10 @@ import { ProjectInterface } from "./types"
export const getProjectById = (id: string | number, lang = "en") => {
const project: ProjectInterface =
projects.filter((project) => String(project.id?.toLowerCase()) === id)[0] ??
{}
projects.filter(
(project) =>
String(project.id?.toLowerCase()) === id.toString().toLowerCase()
)[0] ?? {}
const content = project?.content?.[lang]