Files
pse.dev/lib/projectsUtils.ts
Kalidou Diagne fd0d52b6ec fix #435 remove i18n (#451)
* fix #435 remove i18n
2025-06-12 23:30:32 +08:00

19 lines
448 B
TypeScript

import { projects } from "@/data/projects"
import { ProjectInterface } from "./types"
export const getProjectById = (id: string | number) => {
const project: ProjectInterface =
projects.filter(
(project) =>
String(project.id?.toLowerCase()) === id.toString().toLowerCase()
)[0] ?? {}
const content = project?.content?.["en"] // TODO: To remove after all projects are updated
return {
project,
content,
}
}