fixing eror

This commit is contained in:
Sabda Yagra 2025-06-03 10:35:09 +07:00
parent 35462046ae
commit 3e4bae16b2
4 changed files with 29 additions and 7 deletions

View File

@ -45,7 +45,7 @@ const page = () => {
// <ContentCategory type="" group="polda" />
// </div>
<div>
<HeroNewPolda />
<HeroNew group="polda" />
<div className="flex-1 ">
<SearchSectionPolda />
</div>

View File

@ -3,6 +3,7 @@
import ContentCategory from "@/components/landing-page/content-category";
import Footer from "@/components/landing-page/footer";
import HeaderBannerSatker from "@/components/landing-page/header-banner-satker";
import HeroNew from "@/components/landing-page/hero-new";
import HeroNewSatker from "@/components/landing-page/hero-new-satker";
import NewContent from "@/components/landing-page/new-content";
import SearchSectionSatker from "@/components/landing-page/search-section-satker";
@ -19,11 +20,11 @@ const page = () => {
// <ContentCategory group="satker" type="latest" />
// </div>
<div>
<HeroNewSatker />
<div className="flex-1 ">
<SearchSectionSatker />
</div>
</div>
<HeroNew group="satker" />
<div className="flex-1 ">
<SearchSectionSatker />
</div>
</div>
);
};

View File

@ -0,0 +1,20 @@
"use client";
import Image from "next/image";
import { usePathname } from "next/navigation";
export const DynamicLogoPolda = () => {
const pathname = usePathname();
const getLogoSrc = () => {
if (pathname?.startsWith("/polda/aceh")) return "/logo/polda/polda-aceh.png";
if (pathname?.startsWith("/user")) return "/logos/user-logo.svg";
return "/logos/default-logo.svg";
};
return (
<div className="p-2">
<Image src={getLogoSrc()} alt="Logo" width={120} height={40} className="object-contain" />
</div>
);
};

View File

@ -22,6 +22,7 @@ import { getUserNotifications, listRole } from "@/service/landing/landing";
import { Tabs, TabsContent, TabsList, TabsTrigger } from "@/components/ui/tabs";
import { Popover, PopoverContent, PopoverTrigger } from "@/components/ui/popover";
import PoldaLogo from "./polda-logo";
import { DynamicLogoPolda } from "./dynamic-logo-polda";
type Detail = {
id: number;
@ -161,7 +162,7 @@ const Navbar = () => {
<Link href={prefixPath} className="flex items-center">
<Image src="/assets/mediahub-logo.gif" alt="Media Hub Logo" width={2560} height={1440} className=" w-[200px] h-full shrink-0 object-contain" />
</Link>
{/* <PoldaLogo /> */}
<DynamicLogoPolda />
{/* Nav Menu */}
<div className="hidden custom-lg-button:flex items-center gap-5">
<NavigationMenu>