mirror of
https://github.com/privacy-scaling-explorations/pse.dev.git
synced 2026-04-23 03:01:03 -04:00
17 lines
370 B
TypeScript
17 lines
370 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?.toLowerCase()) === id)[0] ??
|
|
{}
|
|
|
|
const content = project?.content?.[lang]
|
|
|
|
return {
|
|
project,
|
|
content,
|
|
}
|
|
}
|