merge
This commit is contained in:
commit
5b6ba3e23d
|
|
@ -1,30 +1,14 @@
|
|||
"use client";
|
||||
import { Button } from "@/components/ui/button";
|
||||
import {
|
||||
Dialog,
|
||||
DialogClose,
|
||||
DialogContent,
|
||||
DialogDescription,
|
||||
DialogFooter,
|
||||
DialogHeader,
|
||||
DialogTitle,
|
||||
DialogTrigger,
|
||||
} from "@/components/ui/dialog";
|
||||
import { Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogTitle, DialogTrigger } from "@/components/ui/dialog";
|
||||
import { toast } from "sonner";
|
||||
|
||||
import { Input } from "@/components/ui/input";
|
||||
import { close, error, loading, successCallback } from "@/config/swal";
|
||||
import {
|
||||
getMediaTracking,
|
||||
listDataAllNonPagination,
|
||||
listDataTracking,
|
||||
mediaTrackingSave,
|
||||
} from "@/service/media-tracking/media-tracking";
|
||||
import { getMediaTracking, listDataAllNonPagination, listDataTracking, mediaTrackingSave } from "@/service/media-tracking/media-tracking";
|
||||
import { useEffect, useState } from "react";
|
||||
|
||||
export default function TrackingMediaModal(props: {
|
||||
triggerFetch: () => void;
|
||||
}) {
|
||||
export default function TrackingMediaModal(props: { triggerFetch: () => void }) {
|
||||
const [content, setContent] = useState<any>([]);
|
||||
const [inputValue, setInputValue] = useState("");
|
||||
const [selectedId, setSelectedId] = useState(0);
|
||||
|
|
@ -103,22 +87,13 @@ export default function TrackingMediaModal(props: {
|
|||
</DialogHeader>
|
||||
<div className="flex flex-col gap-2">
|
||||
{" "}
|
||||
<Input
|
||||
type="text"
|
||||
placeholder="Content"
|
||||
value={inputValue}
|
||||
onChange={handleInputChange}
|
||||
/>{" "}
|
||||
<Input type="text" placeholder="Content" value={inputValue} onChange={handleInputChange} />{" "}
|
||||
<div className="w-full border rounded-sm text-xs p-2 flex flex-col max-h-[300px] overflow-auto">
|
||||
{content.length > 0 &&
|
||||
content.map((item: any) => (
|
||||
<a
|
||||
key={item.id}
|
||||
className={`cursor-pointer px-2 py-4 ${
|
||||
selectedId === item.id
|
||||
? "font-bold bg-gray-200 rounded-sm"
|
||||
: "hover:bg-gray-100 hover:font-semibold"
|
||||
}`}
|
||||
className={`cursor-pointer px-2 py-4 ${selectedId === item.id ? "font-bold bg-gray-200 rounded-sm" : "hover:bg-gray-100 hover:font-semibold"}`}
|
||||
onClick={() => {
|
||||
setSelectedId(item.id);
|
||||
setInputValue(item.title);
|
||||
|
|
|
|||
|
|
@ -45,7 +45,7 @@ const page = () => {
|
|||
// <ContentCategory type="" group="polda" />
|
||||
// </div>
|
||||
<div>
|
||||
<HeroNewPolda />
|
||||
<HeroNew group="polda" />
|
||||
<div className="flex-1 ">
|
||||
<SearchSectionPolda />
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -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>
|
||||
);
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -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>
|
||||
);
|
||||
};
|
||||
|
|
@ -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>
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue