@@ -1,10 +1,9 @@
|
||||
/** @type {import('next').NextConfig} */
|
||||
const nextConfig = {
|
||||
reactStrictMode: false,
|
||||
experimental: {
|
||||
serverActions: true
|
||||
},
|
||||
|
||||
}
|
||||
reactStrictMode: false,
|
||||
experimental: {
|
||||
serverActions: true,
|
||||
},
|
||||
};
|
||||
|
||||
module.exports = nextConfig
|
||||
module.exports = nextConfig;
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
"scripts": {
|
||||
"dev": "bun --bun run next dev --experimental-https",
|
||||
"build": "NODE_OPTIONS='--max-old-space-size=2048' bun --bun run next build",
|
||||
"build:dev": "bun --bun run next build",
|
||||
"start": "bun --bun run next start",
|
||||
"lint": "bun --bun run next lint",
|
||||
"ver": "bunx commit-and-tag-version -- --prerelease"
|
||||
@@ -94,4 +95,4 @@
|
||||
"wibu-pkg": "^1.0.3",
|
||||
"yaml": "^2.3.2"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -11,5 +11,5 @@ export async function GET(req: Request) {
|
||||
userId: userId as string,
|
||||
});
|
||||
|
||||
return NextResponse.json({ res });
|
||||
return NextResponse.json(res, { status: 200 });
|
||||
}
|
||||
|
||||
@@ -1,9 +0,0 @@
|
||||
import { NextResponse } from "next/server";
|
||||
|
||||
export async function GET(params: Request) {
|
||||
const { searchParams } = new URL(params.url);
|
||||
const userId = searchParams.get("userId");
|
||||
|
||||
|
||||
return NextResponse.json({ userId });
|
||||
}
|
||||
12
src/app/api/event/get-all/route.ts
Normal file
12
src/app/api/event/get-all/route.ts
Normal file
@@ -0,0 +1,12 @@
|
||||
import { event_getListAllPublish } from "@/app_modules/event/fun/get/get_list_all_publish";
|
||||
import { toNumber } from "lodash";
|
||||
import { NextResponse } from "next/server";
|
||||
|
||||
export async function GET(params: Request) {
|
||||
const { searchParams } = new URL(params.url);
|
||||
const page = searchParams.get("page");
|
||||
|
||||
const data = await event_getListAllPublish({ page: toNumber(page) });
|
||||
|
||||
return NextResponse.json({ data });
|
||||
}
|
||||
21
src/app/api/event/get-one-by-id/route.ts
Normal file
21
src/app/api/event/get-one-by-id/route.ts
Normal file
@@ -0,0 +1,21 @@
|
||||
import { event_getOneById } from "@/app_modules/event/fun/get/get_one_by_id";
|
||||
import { NextResponse } from "next/server";
|
||||
|
||||
export async function GET(params: Request) {
|
||||
const { searchParams } = new URL(params.url);
|
||||
const eventId = searchParams.get("eventId");
|
||||
|
||||
const res = await event_getOneById(eventId as string);
|
||||
|
||||
if (!res) {
|
||||
return NextResponse.json(
|
||||
{ message: "Event Not Found", data: null },
|
||||
{ status: 404 }
|
||||
);
|
||||
}
|
||||
|
||||
return NextResponse.json(
|
||||
{ message: "Event Found", data: res },
|
||||
{ status: 200 }
|
||||
);
|
||||
}
|
||||
@@ -1,9 +1,9 @@
|
||||
import { funGetUserIdByToken } from "@/app_modules/_global/fun/get";
|
||||
import { newFunGetUserId } from "@/app/lib/new_fun_user_id";
|
||||
import { Event_Create } from "@/app_modules/event";
|
||||
import { Event_getMasterTipeAcara } from "@/app_modules/event/fun/master/get_tipe_acara";
|
||||
|
||||
export default async function Page() {
|
||||
const userLoginId = await funGetUserIdByToken();
|
||||
const userLoginId = await newFunGetUserId();
|
||||
const listTipeAcara = await Event_getMasterTipeAcara();
|
||||
|
||||
return (
|
||||
|
||||
@@ -1,33 +1,35 @@
|
||||
import { funGetUserIdByToken } from "@/app_modules/_global/fun/get";
|
||||
import Ui_Konfirmasi from "@/app_modules/event/_ui/konfirmasi";
|
||||
import {
|
||||
event_funCheckKehadiran,
|
||||
event_funCheckPesertaByUserId,
|
||||
} from "@/app_modules/event/fun";
|
||||
import { event_funCheckPesertaByUserId } from "@/app_modules/event/fun";
|
||||
import { event_getOneById } from "@/app_modules/event/fun/get/get_one_by_id";
|
||||
import moment from "moment";
|
||||
import { redirect } from "next/navigation";
|
||||
|
||||
export default async function Page({ params }: { params: { id: string } }) {
|
||||
const eventId = params.id;
|
||||
const userLoginId = await funGetUserIdByToken();
|
||||
const dataEvent = await event_getOneById(eventId);
|
||||
export default async function Page({
|
||||
params,
|
||||
}: {
|
||||
params: Promise<{ id: string }>;
|
||||
}) {
|
||||
const eventId = (await params).id;
|
||||
|
||||
const checkPeserta = await event_funCheckPesertaByUserId({
|
||||
eventId: eventId,
|
||||
userId: userLoginId as string,
|
||||
});
|
||||
|
||||
if (dataEvent == null) return redirect("/dev/event/main/beranda");
|
||||
// const userLoginId = await funGetUserIdByToken();
|
||||
|
||||
if (moment(dataEvent?.tanggal).diff(moment(), "minutes") > 0)
|
||||
return redirect("/dev/event/main/beranda");
|
||||
// const checkPeserta = await event_funCheckPesertaByUserId({
|
||||
// eventId: eventId,
|
||||
// userId: userLoginId as string,
|
||||
// });
|
||||
|
||||
if (dataEvent?.isArsip)
|
||||
return redirect(`/dev/event/detail/riwayat/${dataEvent.id}`);
|
||||
// if (dataEvent == null) return redirect("/dev/event/main/beranda");
|
||||
|
||||
if (checkPeserta == false)
|
||||
return redirect(`/dev/event/detail/main/${eventId}`);
|
||||
// if (moment(dataEvent?.tanggal).diff(moment(), "minutes") > 0)
|
||||
// return redirect("/dev/event/main/beranda");
|
||||
|
||||
// if (dataEvent?.isArsip)
|
||||
// return redirect(`/dev/event/detail/riwayat/${dataEvent.id}`);
|
||||
|
||||
// if (checkPeserta == false)
|
||||
// return redirect(`/dev/event/detail/main/${eventId}`);
|
||||
|
||||
// if (checkKehadiran) {
|
||||
// return redirect(`/dev/event/main/beranda`);
|
||||
@@ -35,10 +37,7 @@ export default async function Page({ params }: { params: { id: string } }) {
|
||||
|
||||
return (
|
||||
<>
|
||||
<Ui_Konfirmasi
|
||||
dataEvent={dataEvent as any}
|
||||
userLoginId={userLoginId as string}
|
||||
/>
|
||||
<Ui_Konfirmasi userLoginId={"" as string} eventId={eventId} />
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -1,12 +1,10 @@
|
||||
import { Event_Beranda } from "@/app_modules/event";
|
||||
import { event_getListAllPublish } from "@/app_modules/event/fun/get/get_list_all_publish";
|
||||
|
||||
export default async function Page() {
|
||||
const dataEvent = await event_getListAllPublish({ page: 1 });
|
||||
|
||||
return (
|
||||
<>
|
||||
<Event_Beranda dataEvent={dataEvent as any} />
|
||||
<Event_Beranda />
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -1,42 +1,21 @@
|
||||
import { funGetUserIdByToken } from "@/app_modules/_global/fun/get";
|
||||
import { funGlobal_getUserById } from "@/app_modules/_global/fun/get/fun_get_user_by_id";
|
||||
import { redirect } from "next/navigation";
|
||||
import { RealtimeProvider } from "../lib";
|
||||
import { newFunGetUserId } from "../lib/new_fun_user_id";
|
||||
import { ServerEnv } from "../lib/server_env";
|
||||
import { RouterAdminDashboard } from "../lib/router_hipmi/router_admin";
|
||||
import { funGlobal_checkActivationUseById } from "@/app_modules/_global/fun/get/fun_check_activation_use_by_id";
|
||||
|
||||
export default async function Layout({
|
||||
children,
|
||||
}: {
|
||||
children: React.ReactNode;
|
||||
}) {
|
||||
// const userLoginId = await funGetUserIdByToken();
|
||||
// const dataUser = await funGlobal_getUserById({
|
||||
// userId: userLoginId as string,
|
||||
// });
|
||||
|
||||
// if (dataUser?.masterUserRoleId != "1") return redirect("/dev/home");
|
||||
|
||||
// const activationUser = await funGlobal_checkActivationUseById({
|
||||
// userId: userLoginId as string,
|
||||
// });
|
||||
|
||||
// if (activationUser == false) return redirect("/waiting-room");
|
||||
|
||||
return (
|
||||
<>
|
||||
<RealtimeProvider
|
||||
userLoginId={"" as string}
|
||||
WIBU_REALTIME_TOKEN={
|
||||
ServerEnv.value?.NEXT_PUBLIC_WIBU_REALTIME_TOKEN as string
|
||||
}
|
||||
/>
|
||||
|
||||
{children}
|
||||
{/* <CheckCookies_UiLayout dataUser={dataUser as any}>
|
||||
{children}
|
||||
</CheckCookies_UiLayout> */}
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
7
src/app/lib/api_user_router/route_api_event.ts
Normal file
7
src/app/lib/api_user_router/route_api_event.ts
Normal file
@@ -0,0 +1,7 @@
|
||||
export const API_RouteEvent = {
|
||||
get_all: ({ page }: { page: number }) => `/api/event/get-all?page=${page}`,
|
||||
get_one_by_id: ({ eventId }: { eventId: string }) =>
|
||||
`/api/event/get-one-by-id?eventId=${eventId}`,
|
||||
check_kehadiran: ({ eventId, userId }: { eventId: string; userId: string }) =>
|
||||
`/api/event/check-kehadiran?eventId=${eventId}&userId=${userId}`,
|
||||
};
|
||||
21
src/app/lib/new_fun_user_id.ts
Normal file
21
src/app/lib/new_fun_user_id.ts
Normal file
@@ -0,0 +1,21 @@
|
||||
"use server"
|
||||
|
||||
import _ from "lodash";
|
||||
import { cookies } from "next/headers";
|
||||
import { decrypt } from "../auth/_lib/decrypt";
|
||||
|
||||
export async function newFunGetUserId() {
|
||||
const c = cookies().get(process.env.NEXT_PUBLIC_BASE_SESSION_KEY!);
|
||||
|
||||
if (!c || !c?.value || _.isEmpty(c?.value) || _.isUndefined(c?.value)) {
|
||||
return null;
|
||||
}
|
||||
|
||||
const token = c.value;
|
||||
const dataUser = await decrypt({
|
||||
token: token,
|
||||
encodedKey: process.env.NEXT_PUBLIC_BASE_TOKEN_KEY!,
|
||||
});
|
||||
|
||||
return dataUser?.id;
|
||||
}
|
||||
@@ -1,17 +1,26 @@
|
||||
import { PrismaClient } from '@prisma/client'
|
||||
|
||||
const prismaClientSingleton = () => {
|
||||
return new PrismaClient()
|
||||
}
|
||||
|
||||
type PrismaClientSingleton = ReturnType<typeof prismaClientSingleton>
|
||||
import { PrismaClient } from '@prisma/client';
|
||||
|
||||
// Singleton PrismaClient untuk pengembangan
|
||||
const globalForPrisma = globalThis as unknown as {
|
||||
prisma: PrismaClientSingleton | undefined
|
||||
__prisma__: PrismaClient | undefined;
|
||||
};
|
||||
|
||||
export const prisma = globalForPrisma.__prisma__ ?? new PrismaClient({
|
||||
// log: process.env.NODE_ENV === 'development' ? ['query', 'info', 'warn', 'error'] : [],
|
||||
});
|
||||
|
||||
// Gunakan PrismaClient yang sama jika sudah ada
|
||||
if (process.env.NODE_ENV !== 'production') {
|
||||
if (!globalForPrisma.__prisma__) {
|
||||
console.log('PrismaClient initialized in development mode');
|
||||
}
|
||||
globalForPrisma.__prisma__ = prisma;
|
||||
}
|
||||
|
||||
const prisma = globalForPrisma.prisma ?? prismaClientSingleton()
|
||||
process.on('SIGINT', async () => {
|
||||
console.log('Disconnecting PrismaClient...');
|
||||
await prisma.$disconnect();
|
||||
process.exit(0);
|
||||
});
|
||||
|
||||
export default prisma
|
||||
|
||||
if (process.env.NODE_ENV !== 'production') globalForPrisma.prisma = prisma
|
||||
export default prisma;
|
||||
|
||||
@@ -17,8 +17,8 @@ import {
|
||||
gs_votingTiggerBeranda,
|
||||
IRealtimeData,
|
||||
} from "./global_state";
|
||||
import { newFunGetUserId } from "./new_fun_user_id";
|
||||
import { useState } from "react";
|
||||
import { ComponentGlobal_NotifikasiPeringatan } from "@/app_modules/_global/notif_global";
|
||||
|
||||
// const WIBU_REALTIME_TOKEN: string | undefined =
|
||||
// process.env.NEXT_PUBLIC_WIBU_REALTIME_TOKEN;
|
||||
@@ -32,13 +32,11 @@ export type TypeNotification = {
|
||||
};
|
||||
|
||||
export default function RealtimeProvider({
|
||||
userLoginId,
|
||||
WIBU_REALTIME_TOKEN,
|
||||
}: {
|
||||
userLoginId: string;
|
||||
WIBU_REALTIME_TOKEN: string;
|
||||
}) {
|
||||
const [userId, setUserId] = useState("");
|
||||
const [userLoginId, setUserLoginId] = useState("");
|
||||
const [dataRealtime, setDataRealtime] = useAtom(gs_realtimeData);
|
||||
const [newAdminNtf, setNewAdminNtf] = useAtom(gs_admin_ntf);
|
||||
const [newUserNtf, setNewUserNtf] = useAtom(gs_user_ntf);
|
||||
@@ -74,159 +72,146 @@ export default function RealtimeProvider({
|
||||
gs_donasiTriggerBeranda
|
||||
);
|
||||
|
||||
useShallowEffect(() => {
|
||||
onLoadUser({
|
||||
onSetUser(val: string) {
|
||||
async function loadUserId() {
|
||||
const userId = await newFunGetUserId();
|
||||
|
||||
if (val !== "" || val !== undefined) {
|
||||
try {
|
||||
WibuRealtime.init({
|
||||
project: "hipmi",
|
||||
WIBU_REALTIME_TOKEN: WIBU_REALTIME_TOKEN,
|
||||
onData(data: TypeNotification) {
|
||||
if (
|
||||
data.type == "notification" &&
|
||||
data.pushNotificationTo == "ADMIN"
|
||||
) {
|
||||
setNewAdminNtf((e) => e + 1);
|
||||
}
|
||||
|
||||
// Notifikasi ke semua user , yang datanya di acc admin
|
||||
if (
|
||||
data.type == "notification" &&
|
||||
data.pushNotificationTo == "USER" &&
|
||||
data.dataMessage?.userId == userId
|
||||
) {
|
||||
setNewUserNtf((e) => e + 1);
|
||||
setDataRealtime(data.dataMessage as any);
|
||||
}
|
||||
|
||||
// ---------------------- JOB ------------------------- //
|
||||
if (
|
||||
data.type == "trigger" &&
|
||||
data.pushNotificationTo == "ADMIN" &&
|
||||
data.dataMessage?.kategoriApp == "JOB"
|
||||
) {
|
||||
setIsAdminJob_TriggerReview(true);
|
||||
}
|
||||
|
||||
if (
|
||||
data.type == "trigger" &&
|
||||
data.pushNotificationTo == "USER" &&
|
||||
data.dataMessage?.kategoriApp == "JOB" &&
|
||||
data.dataMessage.status == "Publish"
|
||||
) {
|
||||
setIsTriggerJobBeranda(true);
|
||||
}
|
||||
// ---------------------- JOB ------------------------- //
|
||||
|
||||
// ---------------------- EVENT ------------------------- //
|
||||
if (
|
||||
data.type == "trigger" &&
|
||||
data.pushNotificationTo == "ADMIN" &&
|
||||
data.dataMessage?.kategoriApp == "EVENT"
|
||||
) {
|
||||
setIsAdminEvent_TriggerReview(true);
|
||||
}
|
||||
|
||||
if (
|
||||
data.type == "trigger" &&
|
||||
data.pushNotificationTo == "USER" &&
|
||||
data.dataMessage?.kategoriApp == "EVENT" &&
|
||||
data.dataMessage.status == "Publish"
|
||||
) {
|
||||
setIsTriggerEventBeranda(true);
|
||||
}
|
||||
|
||||
if (
|
||||
data.type == "notification" &&
|
||||
data.pushNotificationTo == "USER" &&
|
||||
data.dataMessage?.status == "Peserta Event" &&
|
||||
userId !== data.dataMessage?.userId
|
||||
) {
|
||||
setNewUserNtf((e) => e + 1);
|
||||
}
|
||||
// ---------------------- EVENT ------------------------- //
|
||||
|
||||
// ---------------------- VOTING ------------------------- //
|
||||
if (
|
||||
data.type == "trigger" &&
|
||||
data.pushNotificationTo == "ADMIN" &&
|
||||
data.dataMessage?.kategoriApp == "VOTING"
|
||||
) {
|
||||
setIsAdminVoting_TriggerReview(true);
|
||||
}
|
||||
|
||||
if (
|
||||
data.type == "trigger" &&
|
||||
data.pushNotificationTo == "USER" &&
|
||||
data.dataMessage?.kategoriApp == "VOTING" &&
|
||||
data.dataMessage.status == "Publish"
|
||||
) {
|
||||
setIsTriggerVotingBeranda(true);
|
||||
}
|
||||
|
||||
if (
|
||||
data.type == "notification" &&
|
||||
data.pushNotificationTo == "USER" &&
|
||||
data.dataMessage?.status == "Voting Masuk" &&
|
||||
userId !== data.dataMessage?.userId
|
||||
) {
|
||||
setNewUserNtf((e) => e + 1);
|
||||
}
|
||||
// ---------------------- VOTING ------------------------- //
|
||||
|
||||
// ---------------------- DONASI ------------------------- //
|
||||
if (
|
||||
data.type == "trigger" &&
|
||||
data.pushNotificationTo == "ADMIN" &&
|
||||
data.dataMessage?.kategoriApp == "DONASI"
|
||||
) {
|
||||
setIsAdminDonasi_TriggerReview(true);
|
||||
}
|
||||
|
||||
if (
|
||||
data.type == "trigger" &&
|
||||
data.pushNotificationTo == "USER" &&
|
||||
data.dataMessage?.kategoriApp == "DONASI" &&
|
||||
data.dataMessage.status == "Publish"
|
||||
) {
|
||||
setIsTriggerDonasiBeranda(true);
|
||||
}
|
||||
|
||||
// if (
|
||||
// data.type == "notification" &&
|
||||
// data.pushNotificationTo == "ADMIN" &&
|
||||
// data.dataMessage?.status == "Menunggu" &&
|
||||
// userLoginId !== data.dataMessage?.userId
|
||||
// ) {
|
||||
// console.log("yes");
|
||||
// }
|
||||
|
||||
// ---------------------- DONASI ------------------------- //
|
||||
},
|
||||
});
|
||||
} catch (error) {
|
||||
console.log(error);
|
||||
}
|
||||
} else {
|
||||
return undefined;
|
||||
}
|
||||
},
|
||||
});
|
||||
}, [setUserId]);
|
||||
|
||||
async function onLoadUser({
|
||||
onSetUser,
|
||||
}: {
|
||||
onSetUser: (val: string) => void;
|
||||
}) {
|
||||
const res = await fetch("/api/user", {
|
||||
method: "GET",
|
||||
});
|
||||
const result = await res.json();
|
||||
onSetUser(result.data.id);
|
||||
setUserLoginId(userId as string);
|
||||
}
|
||||
|
||||
useShallowEffect(() => {
|
||||
loadUserId();
|
||||
|
||||
try {
|
||||
WibuRealtime.init({
|
||||
project: "hipmi",
|
||||
WIBU_REALTIME_TOKEN: WIBU_REALTIME_TOKEN,
|
||||
onData(data: TypeNotification) {
|
||||
if (
|
||||
data.type == "notification" &&
|
||||
data.pushNotificationTo == "ADMIN"
|
||||
) {
|
||||
setNewAdminNtf((e) => e + 1);
|
||||
}
|
||||
|
||||
// Notifikasi ke semua user , yang datanya di acc admin
|
||||
if (
|
||||
data.type == "notification" &&
|
||||
data.pushNotificationTo == "USER" &&
|
||||
data.dataMessage?.userId == userLoginId
|
||||
) {
|
||||
setNewUserNtf((e) => e + 1);
|
||||
setDataRealtime(data.dataMessage as any);
|
||||
}
|
||||
|
||||
// ---------------------- JOB ------------------------- //
|
||||
if (
|
||||
data.type == "trigger" &&
|
||||
data.pushNotificationTo == "ADMIN" &&
|
||||
data.dataMessage?.kategoriApp == "JOB"
|
||||
) {
|
||||
setIsAdminJob_TriggerReview(true);
|
||||
}
|
||||
|
||||
if (
|
||||
data.type == "trigger" &&
|
||||
data.pushNotificationTo == "USER" &&
|
||||
data.dataMessage?.kategoriApp == "JOB" &&
|
||||
data.dataMessage.status == "Publish"
|
||||
) {
|
||||
setIsTriggerJobBeranda(true);
|
||||
}
|
||||
// ---------------------- JOB ------------------------- //
|
||||
|
||||
// ---------------------- EVENT ------------------------- //
|
||||
if (
|
||||
data.type == "trigger" &&
|
||||
data.pushNotificationTo == "ADMIN" &&
|
||||
data.dataMessage?.kategoriApp == "EVENT"
|
||||
) {
|
||||
setIsAdminEvent_TriggerReview(true);
|
||||
}
|
||||
|
||||
if (
|
||||
data.type == "trigger" &&
|
||||
data.pushNotificationTo == "USER" &&
|
||||
data.dataMessage?.kategoriApp == "EVENT" &&
|
||||
data.dataMessage.status == "Publish"
|
||||
) {
|
||||
setIsTriggerEventBeranda(true);
|
||||
}
|
||||
|
||||
if (
|
||||
data.type == "notification" &&
|
||||
data.pushNotificationTo == "USER" &&
|
||||
data.dataMessage?.status == "Peserta Event" &&
|
||||
userLoginId !== data.dataMessage?.userId
|
||||
) {
|
||||
setNewUserNtf((e) => e + 1);
|
||||
}
|
||||
// ---------------------- EVENT ------------------------- //
|
||||
|
||||
// ---------------------- VOTING ------------------------- //
|
||||
if (
|
||||
data.type == "trigger" &&
|
||||
data.pushNotificationTo == "ADMIN" &&
|
||||
data.dataMessage?.kategoriApp == "VOTING"
|
||||
) {
|
||||
setIsAdminVoting_TriggerReview(true);
|
||||
}
|
||||
|
||||
if (
|
||||
data.type == "trigger" &&
|
||||
data.pushNotificationTo == "USER" &&
|
||||
data.dataMessage?.kategoriApp == "VOTING" &&
|
||||
data.dataMessage.status == "Publish"
|
||||
) {
|
||||
setIsTriggerVotingBeranda(true);
|
||||
}
|
||||
|
||||
if (
|
||||
data.type == "notification" &&
|
||||
data.pushNotificationTo == "USER" &&
|
||||
data.dataMessage?.status == "Voting Masuk" &&
|
||||
userLoginId !== data.dataMessage?.userId
|
||||
) {
|
||||
setNewUserNtf((e) => e + 1);
|
||||
}
|
||||
// ---------------------- VOTING ------------------------- //
|
||||
|
||||
// ---------------------- DONASI ------------------------- //
|
||||
if (
|
||||
data.type == "trigger" &&
|
||||
data.pushNotificationTo == "ADMIN" &&
|
||||
data.dataMessage?.kategoriApp == "DONASI"
|
||||
) {
|
||||
setIsAdminDonasi_TriggerReview(true);
|
||||
}
|
||||
|
||||
if (
|
||||
data.type == "trigger" &&
|
||||
data.pushNotificationTo == "USER" &&
|
||||
data.dataMessage?.kategoriApp == "DONASI" &&
|
||||
data.dataMessage.status == "Publish"
|
||||
) {
|
||||
setIsTriggerDonasiBeranda(true);
|
||||
}
|
||||
|
||||
// if (
|
||||
// data.type == "notification" &&
|
||||
// data.pushNotificationTo == "ADMIN" &&
|
||||
// data.dataMessage?.status == "Menunggu" &&
|
||||
// userLoginId !== data.dataMessage?.userId
|
||||
// ) {
|
||||
// console.log("yes");
|
||||
// }
|
||||
|
||||
// ---------------------- DONASI ------------------------- //
|
||||
},
|
||||
});
|
||||
} catch (error) {
|
||||
console.log("Error!:", error);
|
||||
}
|
||||
}, []);
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -108,15 +108,15 @@ export default function AdminEvent_ComponentTableReview({
|
||||
|
||||
async function onPublish({
|
||||
eventId,
|
||||
tanggalSelesai,
|
||||
tanggal,
|
||||
}: {
|
||||
eventId: string;
|
||||
tanggalSelesai: Date;
|
||||
tanggal: Date;
|
||||
}) {
|
||||
const checkStatus = await event_checkStatus({ id: eventId });
|
||||
|
||||
if (checkStatus) {
|
||||
if (moment(tanggalSelesai).diff(Date.now(), "minutes") < 0)
|
||||
if (moment(tanggal).diff(Date.now(), "minutes") < 0)
|
||||
return ComponentGlobal_NotifikasiPeringatan(
|
||||
"Waktu acara telah lewat, Report untuk memberitahu user !"
|
||||
);
|
||||
@@ -267,7 +267,7 @@ export default function AdminEvent_ComponentTableReview({
|
||||
</Text>
|
||||
</Center>
|
||||
</td>
|
||||
|
||||
|
||||
<td>
|
||||
<Center w={400}>
|
||||
<Spoiler hideLabel="sembunyikan" maxHeight={50} showLabel="tampilkan">
|
||||
@@ -286,7 +286,7 @@ export default function AdminEvent_ComponentTableReview({
|
||||
onClick={() =>
|
||||
onPublish({
|
||||
eventId: e.id,
|
||||
tanggalSelesai: e.tanggalSelesai,
|
||||
tanggal: e.tanggal,
|
||||
})
|
||||
}
|
||||
>
|
||||
@@ -297,7 +297,7 @@ export default function AdminEvent_ComponentTableReview({
|
||||
leftIcon={<IconBan />}
|
||||
radius={"xl"}
|
||||
onClick={async () => {
|
||||
const checkStatus = await event_checkStatus({ id: eventId });
|
||||
const checkStatus = await event_checkStatus({ id: e.id });
|
||||
|
||||
if (checkStatus) {
|
||||
open();
|
||||
|
||||
@@ -4,7 +4,17 @@ import {
|
||||
UIGlobal_LayoutDefault,
|
||||
UIGlobal_LayoutTamplate,
|
||||
} from "@/app_modules/_global/ui";
|
||||
import { Button, Paper, Skeleton, Stack, Text, Title } from "@mantine/core";
|
||||
import {
|
||||
Button,
|
||||
Card,
|
||||
Center,
|
||||
Group,
|
||||
Paper,
|
||||
Skeleton,
|
||||
Stack,
|
||||
Text,
|
||||
Title,
|
||||
} from "@mantine/core";
|
||||
import { MODEL_EVENT } from "../model/interface";
|
||||
import { useShallowEffect } from "@mantine/hooks";
|
||||
import { AccentColor, MainColor } from "@/app_modules/_global/color";
|
||||
@@ -13,112 +23,328 @@ import {
|
||||
ComponentGlobal_NotifikasiBerhasil,
|
||||
ComponentGlobal_NotifikasiGagal,
|
||||
} from "@/app_modules/_global/notif_global";
|
||||
import { useRouter } from "next/navigation";
|
||||
import { redirect, useRouter } from "next/navigation";
|
||||
import { RouterEvent } from "@/app/lib/router_hipmi/router_event";
|
||||
import { useState } from "react";
|
||||
import { API_RouteEvent } from "@/app/lib/api_user_router/route_api_event";
|
||||
import { ComponentGlobal_CardStyles } from "@/app_modules/_global/component";
|
||||
import moment from "moment";
|
||||
import { gs_event_hotMenu } from "../global_state";
|
||||
import { useAtom } from "jotai";
|
||||
|
||||
export default function Ui_Konfirmasi({
|
||||
dataEvent,
|
||||
userLoginId,
|
||||
eventId,
|
||||
}: {
|
||||
dataEvent: MODEL_EVENT;
|
||||
userLoginId: string;
|
||||
eventId: string;
|
||||
}) {
|
||||
// console.log(dataEvent);
|
||||
|
||||
const router = useRouter();
|
||||
const [isLoading, setLoading] = useState(false);
|
||||
const [data, setData] = useState<MODEL_EVENT | null>(null);
|
||||
const [isPresent, setIsPresent] = useState<boolean | null>(null);
|
||||
|
||||
useShallowEffect(() => {
|
||||
onLoadKehadiran({
|
||||
onChange(val) {
|
||||
setIsPresent(val);
|
||||
},
|
||||
});
|
||||
}, [setIsPresent]);
|
||||
onLoadData();
|
||||
}, []);
|
||||
|
||||
async function onLoadKehadiran({
|
||||
onChange,
|
||||
}: {
|
||||
onChange: (val: boolean) => void;
|
||||
}) {
|
||||
const res = await fetch(
|
||||
`/api/event/check-kehadiran?userId=${userLoginId}&eventId=${dataEvent.id}`
|
||||
async function onLoadData() {
|
||||
const data = await fetch(
|
||||
API_RouteEvent.get_one_by_id({ eventId: eventId })
|
||||
);
|
||||
const checkKehadiran = await res.json();
|
||||
|
||||
onChange(checkKehadiran.res);
|
||||
}
|
||||
async function onUpdateKonfirmasi() {
|
||||
setLoading(true);
|
||||
const res = await event_funUpdateKehadiran({
|
||||
eventId: dataEvent.id,
|
||||
userId: userLoginId,
|
||||
});
|
||||
|
||||
if (res.status === 200) {
|
||||
ComponentGlobal_NotifikasiBerhasil(res.message, 2000);
|
||||
router.push(RouterEvent.detail_main + dataEvent.id);
|
||||
} else {
|
||||
setLoading(false);
|
||||
ComponentGlobal_NotifikasiGagal(res.message);
|
||||
}
|
||||
const res = await data.json();
|
||||
console.log(res.data, "data event");
|
||||
setData(res.data);
|
||||
}
|
||||
|
||||
console.log(isPresent, "isPresent");
|
||||
useShallowEffect(() => {
|
||||
onLoadKehadiran();
|
||||
}, []);
|
||||
|
||||
async function onLoadKehadiran() {
|
||||
const res = await fetch(
|
||||
API_RouteEvent.check_kehadiran({ eventId: eventId, userId: userLoginId })
|
||||
);
|
||||
const data = await res.json();
|
||||
|
||||
setIsPresent(data);
|
||||
}
|
||||
|
||||
// console.log("kehadiran:", isPresent);
|
||||
// console.log("data:", data);
|
||||
|
||||
if (data == null && isPresent == null) {
|
||||
return <SkeletonIsDataNull />;
|
||||
}
|
||||
|
||||
if (data == null) {
|
||||
return (
|
||||
<>
|
||||
<DataNotFound />
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
if (moment(data?.tanggal).diff(moment(), "minute") < 0) {
|
||||
return (
|
||||
<>
|
||||
<EventAlreadyDone title={data?.title} eventId={eventId} />
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
if (isPresent && data) {
|
||||
return <UserAlreadyConfirm title={data.title} />;
|
||||
}
|
||||
|
||||
if (isPresent == false && data) {
|
||||
return (
|
||||
<UserNotConfirm
|
||||
title={data.title}
|
||||
eventId={eventId}
|
||||
userLoginId={userLoginId}
|
||||
/>
|
||||
);
|
||||
}
|
||||
// const tgl = moment(data?.tanggal).diff(moment(), "minute") < 0;
|
||||
// return (
|
||||
// <>
|
||||
// <UIGlobal_LayoutDefault>
|
||||
// <Stack h={"100vh"} justify="center" c={"white"}>
|
||||
// {JSON.stringify(tgl)}
|
||||
// </Stack>
|
||||
// </UIGlobal_LayoutDefault>
|
||||
// </>
|
||||
// );
|
||||
}
|
||||
|
||||
function DataNotFound() {
|
||||
const router = useRouter();
|
||||
const [isLoading, setLoading] = useState(false);
|
||||
const [hotMenu, setHotMenu] = useAtom(gs_event_hotMenu);
|
||||
|
||||
return (
|
||||
<>
|
||||
<UIGlobal_LayoutDefault>
|
||||
<Stack h={"100vh"} align="center" justify="center">
|
||||
{isPresent == null ? (
|
||||
<Skeleton h={200} w={300} radius={"sm"} />
|
||||
) : isPresent ? (
|
||||
<Paper p={"md"} withBorder bg={AccentColor.softblue}>
|
||||
<Stack align="center" justify="center">
|
||||
<Text fw={"bold"} align="center">
|
||||
Anda telah terkonfirmasi silahkan kembali ke beranda !
|
||||
</Text>
|
||||
<Title order={3}>{dataEvent.title}</Title>
|
||||
<Button
|
||||
loading={isLoading}
|
||||
loaderPosition="center"
|
||||
radius={"md"}
|
||||
color="green"
|
||||
c={"black"}
|
||||
onClick={() => {
|
||||
router.push(RouterEvent.beranda, { scroll: false });
|
||||
}}
|
||||
>
|
||||
Beranda
|
||||
</Button>
|
||||
</Stack>
|
||||
</Paper>
|
||||
) : (
|
||||
<Paper p={"md"} withBorder bg={AccentColor.softblue}>
|
||||
<Stack align="center" justify="center">
|
||||
<Text fw={"bold"} align="center">
|
||||
Anda mengkonfirmasi bahwa anda telah datang & ikut menghadir
|
||||
di event
|
||||
</Text>
|
||||
<Title order={3}>{dataEvent.title}</Title>
|
||||
<Button
|
||||
loading={isLoading}
|
||||
loaderPosition="center"
|
||||
radius={"xs"}
|
||||
bg={MainColor.yellow}
|
||||
color="yellow"
|
||||
c={"black"}
|
||||
onClick={() => {
|
||||
onUpdateKonfirmasi();
|
||||
}}
|
||||
>
|
||||
YA
|
||||
</Button>
|
||||
</Stack>
|
||||
</Paper>
|
||||
)}
|
||||
<Stack h={"100vh"} justify="center">
|
||||
<ComponentGlobal_CardStyles>
|
||||
<Stack>
|
||||
<Text fw={"bold"} align="center">
|
||||
Data Event Tidak Ditemukan
|
||||
</Text>
|
||||
|
||||
<Button
|
||||
loading={isLoading}
|
||||
loaderPosition="center"
|
||||
radius={"xl"}
|
||||
color="green"
|
||||
c={"black"}
|
||||
onClick={() => {
|
||||
setHotMenu(0);
|
||||
setLoading(true);
|
||||
router.push(RouterEvent.beranda, { scroll: false });
|
||||
}}
|
||||
>
|
||||
Kembali Ke Beranda
|
||||
</Button>
|
||||
</Stack>
|
||||
</ComponentGlobal_CardStyles>
|
||||
</Stack>
|
||||
</UIGlobal_LayoutDefault>
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
function SkeletonIsDataNull() {
|
||||
return (
|
||||
<>
|
||||
<UIGlobal_LayoutDefault>
|
||||
<Stack h={"100vh"} justify="center">
|
||||
<ComponentGlobal_CardStyles>
|
||||
<Stack>
|
||||
<Skeleton height={20} width={"100%"} radius={"xl"} />{" "}
|
||||
<Skeleton height={20} width={"100%"} radius={"xl"} />{" "}
|
||||
<Skeleton height={20} width={"100%"} radius={"xl"} />
|
||||
<Center>
|
||||
<Skeleton height={40} width={"40%"} radius={"sm"} />
|
||||
</Center>
|
||||
</Stack>
|
||||
</ComponentGlobal_CardStyles>
|
||||
</Stack>
|
||||
</UIGlobal_LayoutDefault>
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
function EventAlreadyDone({
|
||||
title,
|
||||
eventId,
|
||||
}: {
|
||||
title: string;
|
||||
eventId: string;
|
||||
}) {
|
||||
const router = useRouter();
|
||||
const [isLoading, setLoading] = useState(false);
|
||||
const [isLoadingDetail, setLoadingDetail] = useState(false);
|
||||
const [hotMenu, setHotMenu] = useAtom(gs_event_hotMenu);
|
||||
|
||||
return (
|
||||
<>
|
||||
<UIGlobal_LayoutDefault>
|
||||
<Stack h={"100vh"} justify="center">
|
||||
<ComponentGlobal_CardStyles>
|
||||
<Stack align="center" justify="center">
|
||||
<Text align="center">
|
||||
Kami mohon maaf, Bapak/Ibu, acara{" "}
|
||||
<Text inherit span fw={"bold"}>
|
||||
{title}
|
||||
</Text>{" "}
|
||||
telah selesai, sehingga konfirmasi kehadiran sudah tidak dapat
|
||||
dilakukan. Terima kasih atas perhatian dan minat Anda. Kami
|
||||
berharap dapat bertemu di acara kami berikutnya. Terima kasih,
|
||||
Bapak/Ibu, kehadiran Anda di acara.
|
||||
</Text>
|
||||
</Stack>
|
||||
<Group grow mt={"lg"}>
|
||||
<Button
|
||||
loading={isLoading}
|
||||
loaderPosition="center"
|
||||
radius={"xl"}
|
||||
color="green"
|
||||
c={"black"}
|
||||
onClick={() => {
|
||||
setHotMenu(0);
|
||||
setLoading(true);
|
||||
router.push(RouterEvent.beranda, { scroll: false });
|
||||
}}
|
||||
>
|
||||
Beranda
|
||||
</Button>
|
||||
|
||||
<Button
|
||||
loading={isLoadingDetail}
|
||||
loaderPosition="center"
|
||||
radius={"xl"}
|
||||
c={"black"}
|
||||
onClick={() => {
|
||||
setHotMenu(3);
|
||||
setLoadingDetail(true);
|
||||
router.push(RouterEvent.detail_riwayat + eventId, {
|
||||
scroll: false,
|
||||
});
|
||||
}}
|
||||
>
|
||||
Riwayat Event
|
||||
</Button>
|
||||
</Group>
|
||||
</ComponentGlobal_CardStyles>
|
||||
</Stack>
|
||||
</UIGlobal_LayoutDefault>
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
function UserNotConfirm({
|
||||
title,
|
||||
eventId,
|
||||
userLoginId,
|
||||
}: {
|
||||
title: string;
|
||||
eventId: string;
|
||||
userLoginId: string;
|
||||
}) {
|
||||
const router = useRouter();
|
||||
const [isLoading, setLoading] = useState(false);
|
||||
async function onUpdateKonfirmasi() {
|
||||
setLoading(true);
|
||||
const res = await event_funUpdateKehadiran({
|
||||
eventId: eventId,
|
||||
userId: userLoginId,
|
||||
});
|
||||
|
||||
if (res.status === 200) {
|
||||
ComponentGlobal_NotifikasiBerhasil(res.message, 2000);
|
||||
router.push(RouterEvent.detail_main + eventId);
|
||||
} else {
|
||||
setLoading(false);
|
||||
ComponentGlobal_NotifikasiGagal(res.message);
|
||||
}
|
||||
}
|
||||
return (
|
||||
<>
|
||||
<UIGlobal_LayoutDefault>
|
||||
<Stack h={"100vh"} justify="center">
|
||||
<ComponentGlobal_CardStyles>
|
||||
<Stack align="center" justify="center">
|
||||
<Text align="center">
|
||||
Terima kasih atas kehadiran Anda di acara{" "}
|
||||
<Text inherit span fw={"bold"}>
|
||||
{title}
|
||||
</Text>{" "}
|
||||
pada hari ini. Mohon untuk mengonfirmasi kehadiran Anda dengan
|
||||
menekan tombol {"Hadir"} atau fitur konfirmasi yang tersedia di
|
||||
bawah. Terima kasih dan selamat menikmati acara.
|
||||
</Text>
|
||||
|
||||
<Button
|
||||
loading={isLoading}
|
||||
loaderPosition="center"
|
||||
radius={"xs"}
|
||||
bg={MainColor.yellow}
|
||||
color="yellow"
|
||||
c={"black"}
|
||||
onClick={() => {
|
||||
onUpdateKonfirmasi();
|
||||
}}
|
||||
>
|
||||
HADIR
|
||||
</Button>
|
||||
</Stack>
|
||||
</ComponentGlobal_CardStyles>
|
||||
</Stack>
|
||||
</UIGlobal_LayoutDefault>
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
function UserAlreadyConfirm({ title }: { title: string }) {
|
||||
const router = useRouter();
|
||||
const [isLoading, setLoading] = useState(false);
|
||||
const [hotMenu, setHotMenu] = useAtom(gs_event_hotMenu);
|
||||
|
||||
return (
|
||||
<>
|
||||
<UIGlobal_LayoutDefault>
|
||||
<Stack h={"100vh"} justify="center">
|
||||
<ComponentGlobal_CardStyles>
|
||||
<Stack align="center" justify="center">
|
||||
<Text align="center">
|
||||
Terima kasih, Bapak/Ibu, kehadiran Anda di acara{" "}
|
||||
<Text inherit span fw={"bold"}>
|
||||
{title}
|
||||
</Text>{" "}
|
||||
telah berhasil dikonfirmasi. Kami senang menyambut Anda dan
|
||||
semoga acara ini memberikan manfaat yang maksimal. Selamat
|
||||
mengikuti kegiatan.
|
||||
</Text>
|
||||
|
||||
<Button
|
||||
loading={isLoading}
|
||||
loaderPosition="center"
|
||||
radius={"xl"}
|
||||
color="green"
|
||||
c={"black"}
|
||||
onClick={() => {
|
||||
setHotMenu(0);
|
||||
setLoading(true);
|
||||
router.push(RouterEvent.beranda, { scroll: false });
|
||||
}}
|
||||
>
|
||||
Beranda
|
||||
</Button>
|
||||
</Stack>
|
||||
</ComponentGlobal_CardStyles>
|
||||
</Stack>
|
||||
</UIGlobal_LayoutDefault>
|
||||
</>
|
||||
|
||||
@@ -34,11 +34,11 @@ export function ComponentEvent_CardBeranda({ data }: { data: any }) {
|
||||
<Title order={5} lineClamp={1}>
|
||||
{data.title}
|
||||
</Title>
|
||||
<Text align="right" fz={"sm"} lineClamp={1}>
|
||||
{/* <Text align="right" fz={"sm"} lineClamp={1}>
|
||||
{new Intl.DateTimeFormat("id-ID", {
|
||||
dateStyle: "medium",
|
||||
}).format(data.tanggal)}
|
||||
</Text>
|
||||
}).format(data?.tanggal)}
|
||||
</Text> */}
|
||||
</Group>
|
||||
|
||||
<Text fz={"sm"} lineClamp={2}>
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
import Event_ComponentCreateButton from "./button/button_create_event";
|
||||
import Event_ComponentSkeletonBeranda from "./skeleton/comp_skeleton_beranda";
|
||||
import { Event_ComponentSkeletonDetailData } from "./skeleton/comp_skeleton_detail_data";
|
||||
|
||||
export { Event_ComponentSkeletonDetailData };
|
||||
export { Event_ComponentCreateButton };
|
||||
export { Event_ComponentSkeletonBeranda };
|
||||
|
||||
@@ -0,0 +1,29 @@
|
||||
import { AccentColor } from "@/app_modules/_global/color";
|
||||
import { ComponentGlobal_CardStyles } from "@/app_modules/_global/component";
|
||||
import { Grid, Group, Paper, Skeleton, Stack, Text } from "@mantine/core";
|
||||
|
||||
export default function Event_ComponentSkeletonBeranda() {
|
||||
return (
|
||||
<>
|
||||
{Array.from({ length: 10 }).map((_, index) => (
|
||||
<ComponentGlobal_CardStyles key={index} marginBottom={"16px"}>
|
||||
<Stack>
|
||||
<Grid align="center">
|
||||
<Grid.Col span={"content"}>
|
||||
<Skeleton radius={"100%"} h={50} w={50} />
|
||||
</Grid.Col>
|
||||
<Grid.Col span={"auto"}>
|
||||
<Skeleton h={20} w={"50%"} />
|
||||
</Grid.Col>
|
||||
</Grid>
|
||||
|
||||
<Stack>
|
||||
<Skeleton h={20} w={"100%"} />
|
||||
<Skeleton h={20} w={"100%"} />
|
||||
</Stack>
|
||||
</Stack>
|
||||
</ComponentGlobal_CardStyles>
|
||||
))}
|
||||
</>
|
||||
);
|
||||
}
|
||||
@@ -13,6 +13,7 @@ import {
|
||||
Loader,
|
||||
rem,
|
||||
Skeleton,
|
||||
Paper,
|
||||
} from "@mantine/core";
|
||||
import { useShallowEffect } from "@mantine/hooks";
|
||||
import { useAtom } from "jotai";
|
||||
@@ -22,12 +23,10 @@ import { useState } from "react";
|
||||
import { ComponentEvent_CardBeranda } from "../component/card_view/card_beranda";
|
||||
import { event_getListAllPublish } from "../fun/get/get_list_all_publish";
|
||||
import { MODEL_EVENT } from "../model/interface";
|
||||
import { Event_ComponentSkeletonBeranda } from "../component";
|
||||
import { API_RouteEvent } from "@/app/lib/api_user_router/route_api_event";
|
||||
|
||||
export default function Event_Beranda({
|
||||
dataEvent,
|
||||
}: {
|
||||
dataEvent: MODEL_EVENT[];
|
||||
}) {
|
||||
export default function Event_Beranda() {
|
||||
const [data, setData] = useState<MODEL_EVENT[] | null>(null);
|
||||
const [activePage, setActivePage] = useState(1);
|
||||
const [isLoading, setIsLoading] = useState(false);
|
||||
@@ -39,6 +38,7 @@ export default function Event_Beranda({
|
||||
const [isShowUpdate, setIsShowUpdate] = useState(false);
|
||||
|
||||
useShallowEffect(() => {
|
||||
setIsShowUpdate(false);
|
||||
loadData();
|
||||
}, []);
|
||||
|
||||
@@ -49,14 +49,16 @@ export default function Event_Beranda({
|
||||
}, [isTriggerEventBeranda]);
|
||||
|
||||
async function loadData() {
|
||||
const loadData = await event_getListAllPublish({ page: 1 });
|
||||
setData(loadData as any);
|
||||
const res = await fetch(API_RouteEvent.get_all({ page: activePage }));
|
||||
const data = await res.json();
|
||||
setData(data.data as any);
|
||||
}
|
||||
|
||||
async function onLoadNewData() {
|
||||
setIsLoading(true);
|
||||
const loadData = await event_getListAllPublish({ page: 1 });
|
||||
setData(loadData as any);
|
||||
const res = await fetch(API_RouteEvent.get_all({ page: 1 }));
|
||||
const data = await res.json();
|
||||
setData(data.data as any);
|
||||
|
||||
setIsShowUpdate(false);
|
||||
setIsTriggerEventBeranca(false);
|
||||
@@ -92,16 +94,7 @@ export default function Event_Beranda({
|
||||
<ComponentGlobal_CreateButton path={RouterEvent.create} />
|
||||
|
||||
{data == null ? (
|
||||
Array.from({ length: 10 }).map((_, index) => (
|
||||
<Skeleton
|
||||
animate
|
||||
mb={"15px"}
|
||||
key={index}
|
||||
radius={"md"}
|
||||
height={"15vh"}
|
||||
w={"100%"}
|
||||
/>
|
||||
))
|
||||
<Event_ComponentSkeletonBeranda />
|
||||
) : _.isEmpty(data) ? (
|
||||
<ComponentGlobal_IsEmptyData />
|
||||
) : (
|
||||
|
||||
@@ -16,7 +16,7 @@ export default function Event_SplashScreen() {
|
||||
setTimeout(() => {
|
||||
router.replace(RouterEvent.beranda);
|
||||
setHotMenu(0);
|
||||
}, 1000);
|
||||
}, 500);
|
||||
}, []);
|
||||
return (
|
||||
<>
|
||||
|
||||
Reference in New Issue
Block a user