import { RouterEvent } from "@/lib/router_hipmi/router_event"; import { MainColor } from "@/app_modules/_global/color"; import { ComponentGlobal_AvatarAndUsername, ComponentGlobal_CardLoadingOverlay, ComponentGlobal_CardStyles, } from "@/app_modules/_global/component"; import { Box, Group, Stack, Text, Title } from "@mantine/core"; import { useRouter } from "next/navigation"; import { useState } from "react"; import { Comp_SetInnerHTML } from "@/app_modules/_global/component/new/comp_set_inner_html"; export function ComponentEvent_CardBeranda({ data }: { data: any }) { const router = useRouter(); const [eventId, setEventId] = useState(""); const [visible, setVisible] = useState(false); return ( <> { setEventId(data?.id); setVisible(true); router.push(RouterEvent.detail_main + data?.id); }} > {data.title} {visible && data?.id === eventId && ( )} ); }