fix: logo satker navbar
This commit is contained in:
parent
f51469942e
commit
8741b08787
|
|
@ -8,7 +8,7 @@ import { usePathname } from "next/navigation";
|
||||||
import Image from "next/image";
|
import Image from "next/image";
|
||||||
|
|
||||||
const regions = [
|
const regions = [
|
||||||
{ name: "ITWASUM POLRI", slug: "itwasum", logo: "/logo/satker/itwasum.png" },
|
{ name: "ITWASUM POLRI", slug: "itwasum", logo: "/logo/satker/ITWASUM.png" },
|
||||||
{ name: "BAINTELKAM POLRI", slug: "baintelkam", logo: "/logo/satker/BAINTELKAM.png" },
|
{ name: "BAINTELKAM POLRI", slug: "baintelkam", logo: "/logo/satker/BAINTELKAM.png" },
|
||||||
{ name: "BAHARKAM POLRI", slug: "baharkam", logo: "/logo/satker/BAHARKAM.png" },
|
{ name: "BAHARKAM POLRI", slug: "baharkam", logo: "/logo/satker/BAHARKAM.png" },
|
||||||
{ name: "BARESKRIM POLRI", slug: "bareskrim", logo: "/logo/satker/BARESKRIM.png" },
|
{ name: "BARESKRIM POLRI", slug: "bareskrim", logo: "/logo/satker/BARESKRIM.png" },
|
||||||
|
|
|
||||||
|
|
@ -6,12 +6,12 @@ import { usePathname } from "next/navigation";
|
||||||
export const DynamicLogoSatker = () => {
|
export const DynamicLogoSatker = () => {
|
||||||
const pathname = usePathname();
|
const pathname = usePathname();
|
||||||
const satker = pathname?.split("/")[3];
|
const satker = pathname?.split("/")[3];
|
||||||
console.log("satker", satker)
|
console.log("satker", satker?.toUpperCase())
|
||||||
|
|
||||||
return <div className="p-2">
|
return <div className="p-2">
|
||||||
{pathname?.includes("/satker") && (
|
{pathname?.includes("/satker") && (
|
||||||
<img
|
<Image
|
||||||
src={`/logo/satker/${satker}.png`}
|
src={`/logo/satker/${satker?.toUpperCase()}.png`}
|
||||||
alt="Logo"
|
alt="Logo"
|
||||||
width={1920}
|
width={1920}
|
||||||
height={1080}
|
height={1080}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue