Fix: Job
Deskripsi: - Fix notifikasi admi to user - Fix count notifikasi di admin dan user ## No Issue
This commit is contained in:
@@ -1,38 +1,40 @@
|
||||
"use client";
|
||||
|
||||
import { useWibuRealtime, WibuRealtime } from "wibu";
|
||||
import { WibuRealtime } from "wibu-pkg";
|
||||
import { v4 } from "uuid";
|
||||
import { Stack, Title, Button } from "@mantine/core";
|
||||
import { useShallowEffect } from "@mantine/hooks";
|
||||
import Countdown from "react-countdown";
|
||||
import { useHookstate } from "@hookstate/core";
|
||||
|
||||
const WIBU_REALTIME_TOKEN: any = process.env.NEXT_PUBLIC_WIBU_REALTIME_TOKEN;
|
||||
|
||||
export function CobaRealtime({ userLoginId }: { userLoginId: string }) {
|
||||
const WIBU_REALTIME_TOKEN: any = process.env.NEXT_PUBLIC_WIBU_REALTIME_TOKEN;
|
||||
|
||||
// const [dataRealTime, setDataRealTime] = useWibuRealtime({
|
||||
// WIBU_REALTIME_TOKEN: WIBU_REALTIME_TOKEN,
|
||||
// project: "hipmi",
|
||||
// });
|
||||
|
||||
|
||||
useShallowEffect(() => {
|
||||
// WibuRealtime.init({
|
||||
// WIBU_REALTIME_TOKEN: WIBU_REALTIME_TOKEN,
|
||||
// project: "hipmi",
|
||||
// onData(data) {
|
||||
// console.log(data);
|
||||
// },
|
||||
// });
|
||||
// return () => {
|
||||
// WibuRealtime.cleanup();
|
||||
// };
|
||||
WibuRealtime.init({
|
||||
onData: (data) => {
|
||||
|
||||
console.log(data)
|
||||
},
|
||||
project: "hipmi",
|
||||
WIBU_REALTIME_TOKEN: WIBU_REALTIME_TOKEN,
|
||||
});
|
||||
}, []);
|
||||
|
||||
return (
|
||||
<>
|
||||
<Stack w={200} p={"lg"}>
|
||||
<Title order={6}>User {userLoginId}</Title>
|
||||
|
||||
<Button
|
||||
onClick={() => {
|
||||
|
||||
// WibuRealtime.setData({
|
||||
// id: v4(),
|
||||
// name: "bagas",
|
||||
@@ -46,3 +48,7 @@ export function CobaRealtime({ userLoginId }: { userLoginId: string }) {
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
import { DIRECTORY_ID } from "@/app/lib";
|
||||
import { TokenStorage } from "@/app/lib/token";
|
||||
import {
|
||||
Box,
|
||||
Button,
|
||||
Card,
|
||||
Center,
|
||||
FileButton,
|
||||
Image,
|
||||
@@ -14,12 +13,8 @@ import { useShallowEffect } from "@mantine/hooks";
|
||||
import { IconCamera, IconUpload } from "@tabler/icons-react";
|
||||
import { useState } from "react";
|
||||
import { AccentColor, MainColor } from "../_global/color";
|
||||
import {
|
||||
ComponentGlobal_NotifikasiBerhasil,
|
||||
ComponentGlobal_NotifikasiPeringatan,
|
||||
} from "../_global/notif_global";
|
||||
import { DIRECTORY_ID } from "@/app/lib";
|
||||
import { funGlobal_UploadToStorage } from "../_global/fun";
|
||||
import { ComponentGlobal_NotifikasiPeringatan } from "../_global/notif_global";
|
||||
|
||||
export default function Coba_UploadFile() {
|
||||
const [data, setData] = useState<any>();
|
||||
|
||||
Reference in New Issue
Block a user