forked from fahrPool/fahrPool
23 lines
836 B
TypeScript
23 lines
836 B
TypeScript
import Image from "next/image";
|
|
import { WIDMANN_FIRMA_ID, type Firma } from "@/lib/firma/queries";
|
|
|
|
export function FirmenLogo({ firma }: { firma: Firma | null }) {
|
|
if (!firma) {
|
|
return <span className="font-semibold text-night-blue">Plattform-Verwaltung</span>;
|
|
}
|
|
if (firma.logo_pfad) {
|
|
return (
|
|
// eslint-disable-next-line @next/next/no-img-element -- Logo kommt aus einer eigenen Route mit Session-Cookie
|
|
<img
|
|
src={`/firma/logo?v=${encodeURIComponent(firma.logo_pfad)}`}
|
|
alt={firma.name}
|
|
className="h-8 w-auto max-w-[180px] object-contain"
|
|
/>
|
|
);
|
|
}
|
|
if (firma.id === WIDMANN_FIRMA_ID) {
|
|
return <Image src="/brand/widmann-logo.svg" alt="Widmann" width={140} height={21} priority />;
|
|
}
|
|
return <span className="font-semibold text-night-blue">{firma.name}</span>;
|
|
}
|