mirror of
https://github.com/privacy-scaling-explorations/pse.dev.git
synced 2026-01-11 23:28:12 -05:00
16 lines
351 B
TypeScript
16 lines
351 B
TypeScript
import { projects } from "@/data/projects"
|
|
|
|
import { ProjectInterface } from "./types"
|
|
|
|
export const getProjectById = (id: string | number, lang = "en") => {
|
|
const project: ProjectInterface =
|
|
projects.filter((project) => String(project.id) === id)[0] ?? {}
|
|
|
|
const content = project?.content?.[lang]
|
|
|
|
return {
|
|
project,
|
|
content,
|
|
}
|
|
}
|