feat: logo in satker and polda
This commit is contained in:
parent
33566e012f
commit
84ef1dc935
|
|
@ -5,6 +5,7 @@ import { usePathname } from "next/navigation";
|
||||||
|
|
||||||
export const DynamicLogoPolda = () => {
|
export const DynamicLogoPolda = () => {
|
||||||
const pathname = usePathname();
|
const pathname = usePathname();
|
||||||
|
const polda = pathname?.split("/")[2];
|
||||||
|
|
||||||
const getLogoSrc = () => {
|
const getLogoSrc = () => {
|
||||||
if (pathname?.startsWith("/polda/aceh")) return "/logo/polda/polda-aceh.png";
|
if (pathname?.startsWith("/polda/aceh")) return "/logo/polda/polda-aceh.png";
|
||||||
|
|
@ -12,9 +13,5 @@ export const DynamicLogoPolda = () => {
|
||||||
return "/logos/default-logo.svg";
|
return "/logos/default-logo.svg";
|
||||||
};
|
};
|
||||||
|
|
||||||
return (
|
return <div className="p-2">{pathname?.includes("/polda") && <Image src={`/logo/polda/polda-${polda}.png`} alt="Logo" width={120} height={40} className="object-contain" />}</div>;
|
||||||
<div className="p-2">
|
|
||||||
<Image src={getLogoSrc()} alt="Logo" width={120} height={40} className="object-contain" />
|
|
||||||
</div>
|
|
||||||
);
|
|
||||||
};
|
};
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue