From 5f430786b4ecccfdc0fa31cdef05f05a2d0e8067 Mon Sep 17 00:00:00 2001 From: Bagasbanuna02 Date: Tue, 17 Oct 2023 17:21:48 +0800 Subject: [PATCH] feat Desc: - Penambahan fitur notif realtime Issue: Error socket --- src/app_modules/notif/index.tsx | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 src/app_modules/notif/index.tsx diff --git a/src/app_modules/notif/index.tsx b/src/app_modules/notif/index.tsx new file mode 100644 index 00000000..6dc0240d --- /dev/null +++ b/src/app_modules/notif/index.tsx @@ -0,0 +1,17 @@ +"use client"; +import { useShallowEffect } from "@mantine/hooks"; +import io from "socket.io-client"; +import { toast } from "react-toastify"; +// const socket = io("https://io.wibudev.com"); + +export default function AppNotif() { + // useShallowEffect(() => { + // socket.on("io", (data) => { + // console.log(JSON.stringify(data)) + // if (data && data.id === "hipmi") { + // toast.success(data.data); + // } + // }); + // }, []); + return <>; +}