import { OpenInNewSmallIcon } from "@/components/Icons" import Button from "@/components/TempDesignSystem/Button" import Caption from "@/components/TempDesignSystem/Text/Caption" import Subtitle from "@/components/TempDesignSystem/Text/Subtitle" import { getIntl } from "@/i18n" import { getLang } from "@/i18n/serverContext" import styles from "./jobylonCard.module.css" import type { JobylonItem } from "@/types/trpc/routers/jobylon" interface JobylonCardProps { job: JobylonItem } export default async function JobylonCard({ job }: JobylonCardProps) { const intl = await getIntl() const lang = getLang() const deadlineText = job.toDate ? intl.formatMessage( { id: "Deadline: {date}" }, { date: job.toDate.locale(lang).format("Do MMMM") } ) : intl.formatMessage({ id: "Open for application" }) return (

{job.title}

{job.categories.map((cat) => cat.text).join(", ")} {job.locations .map((loc) => `${loc.city}, ${loc.country}`) .join(" | ")} {deadlineText}
) }