mirror of
https://github.com/privacy-scaling-explorations/pse.dev.git
synced 2026-01-14 00:28:28 -05:00
31 lines
628 B
TypeScript
31 lines
628 B
TypeScript
"use client"
|
|
|
|
import { ProjectLinkWebsite } from "@/lib/types"
|
|
|
|
import { ProjectLinkIconMap } from "./project-links"
|
|
|
|
interface ProjectLinkProps {
|
|
url: string
|
|
website: ProjectLinkWebsite
|
|
}
|
|
|
|
export function ProjectLink({ website, url }: ProjectLinkProps) {
|
|
const icon = ProjectLinkIconMap?.[website as ProjectLinkWebsite]
|
|
|
|
if (!icon) return null
|
|
return (
|
|
<a
|
|
href={url}
|
|
onClick={(event) => {
|
|
// prevent box link to redirect to project page
|
|
event?.stopPropagation()
|
|
}}
|
|
target="_blank"
|
|
rel="noopener noreferrer"
|
|
className="text-lg"
|
|
>
|
|
{icon}
|
|
</a>
|
|
)
|
|
}
|