kontenhumas-fe/components/landing-page/dynamic-logo-tenant.tsx

25 lines
539 B
TypeScript

"use client";
import Image from "next/image";
import { usePathname } from "next/navigation";
export const DynamicLogoTenant = () => {
const pathname = usePathname();
const tenant = pathname?.split("/")[3];
return (
<div className="p-2">
{pathname?.includes("/tenant") && (
<Image
priority={true}
src={`/logo/${tenant}.png`}
alt="Logo"
width={1920}
height={1080}
className="object-contain h-[50px] w-[50px] ml-10"
/>
)}
</div>
);
};