revisi: notifikasi
Deskripsi: - membuat notifikasi jika project dan tugas divisi melewati tgl deadline NO Issues
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
'use client'
|
||||
import { TEMA } from '@/module/_global';
|
||||
import { keyWibu, TEMA } from '@/module/_global';
|
||||
import { funGetAllBanner, IDataBanner } from '@/module/banner';
|
||||
import { useHookstate } from '@hookstate/core';
|
||||
import { Carousel } from '@mantine/carousel';
|
||||
@@ -9,11 +9,16 @@ import Autoplay from 'embla-carousel-autoplay';
|
||||
import { useRef, useState } from 'react';
|
||||
import toast from 'react-hot-toast';
|
||||
import { funGetHome } from '../lib/api_home';
|
||||
import { useWibuRealtime } from 'wibu-realtime';
|
||||
export default function Carosole() {
|
||||
const autoplay = useRef(Autoplay({ delay: 5000 }));
|
||||
const tema = useHookstate(TEMA)
|
||||
const [isDesa, setDesa] = useState("")
|
||||
const [isData, setData] = useState<IDataBanner[]>([])
|
||||
const [data, setDataRealtime] = useWibuRealtime({
|
||||
WIBU_REALTIME_TOKEN: keyWibu,
|
||||
project: "sdm"
|
||||
})
|
||||
|
||||
|
||||
const fetchData = async () => {
|
||||
@@ -36,9 +41,19 @@ export default function Carosole() {
|
||||
}
|
||||
};
|
||||
|
||||
async function cekData() {
|
||||
try {
|
||||
const response = await funGetHome('?cat=check-late-project')
|
||||
setDataRealtime(response.data)
|
||||
} catch (error) {
|
||||
console.error(error);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
useShallowEffect(() => {
|
||||
fetchData();
|
||||
cekData();
|
||||
}, []);
|
||||
|
||||
return (
|
||||
|
||||
Reference in New Issue
Block a user