mirror of
https://github.com/privacy-scaling-explorations/pse.dev.git
synced 2026-01-13 08:08:02 -05:00
19 lines
448 B
TypeScript
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,
|
|
}
|
|
}
|