-
+
{roomData?.rechargingRoomName}
diff --git a/src/pages/index.tsx b/src/pages/index.tsx
index 336ab8e..b40ebc3 100644
--- a/src/pages/index.tsx
+++ b/src/pages/index.tsx
@@ -4,16 +4,20 @@ import MainPageIndex from '@/components/home/MainPageIndex';
import Footer from '@/components/layout/footer/Footer';
import MainContainer from '@/components/shared/MainContainer';
import { useMember, useSetMember } from '@/store/user';
-import React, { useEffect } from 'react';
+import React, { useEffect, useState } from 'react';
import { useQuery } from 'react-query';
import { fcmpost } from '@/api/fcm/fcm.post.api';
import { getTokenHandler } from '@/components/pwa/Fcm';
+import PopUpModal from '@/components/home/PopUpModal';
const Index = () => {
//
/* eslint-disable */
const member = useMember();
const { data: memberData } = useQuery({ queryKey: ['userinfo'], queryFn: userinfo });
const setmember = useSetMember();
+
+ const [guideModalOpen, setGuideModalOpen] = useState(false);
+
useEffect(() => {
setmember(memberData?.data);
}, [memberData, setmember]);
@@ -33,10 +37,23 @@ const Index = () => {
fetchToken();
}, []);
+ useEffect(() => {
+ const timeClicked = localStorage.getItem('timeClicked');
+ if (timeClicked) {
+ const currentTime = new Date().getTime();
+ const timeDifference = currentTime - JSON.parse(timeClicked);
+ if (timeDifference < 24 * 60 * 60 * 1000) {
+ return;
+ }
+ }
+ setGuideModalOpen(true);
+ }, []);
+
return (
+ {guideModalOpen ? : null}
);
};