diff --git a/src/pages/terms/Terms.tsx b/src/pages/terms/Terms.tsx
deleted file mode 100644
index dc15c8b..0000000
--- a/src/pages/terms/Terms.tsx
+++ /dev/null
@@ -1,5 +0,0 @@
-const Terms = () => {
- return
Terms
;
-};
-
-export default Terms;
diff --git a/src/pages/thunder/Thunder.tsx b/src/pages/thunder/Thunder.tsx
index f596111..7397d6b 100644
--- a/src/pages/thunder/Thunder.tsx
+++ b/src/pages/thunder/Thunder.tsx
@@ -1,4 +1,3 @@
-import { Link } from 'react-router-dom';
import { useState, useEffect } from 'react';
import ModalBottom from '../../components/common/ModalBottom';
import ThunderCard from '../../components/thunder/ThunderCard';
@@ -6,6 +5,8 @@ import RoundedButton from '../../components/thunder/RoundedButton';
import SelectionItem from '../../components/thunder/SelectionItem';
import { baseInstance } from '../../api/util/instance';
import Loading from '../../components/common/Loading';
+import { getCookie } from '../../utils/cookie';
+import { useNavigate } from 'react-router-dom';
interface Meeting {
uuid: string;
@@ -33,6 +34,8 @@ const Thunder: React.FC = () => {
const [selectedTime, setSelectedTime] = useState
();
const [meetings, setMeetings] = useState(null);
const [isLoading, setIsLoading] = useState(true);
+ const [isLoginModalOpen, setIsLoginModalOpen] = useState(false);
+ const navigate = useNavigate();
useEffect(() => {
document.getElementById('root')?.scrollTo(0, 0);
@@ -82,6 +85,15 @@ const Thunder: React.FC = () => {
setIsSelectedList(isAll);
};
+ const checkLogin = () => {
+ const token = getCookie('refresh');
+ if (!token) {
+ setIsLoginModalOpen(true);
+ } else {
+ navigate('/thunder/thunderpost');
+ }
+ };
+
if (isLoading) {
return ;
}
@@ -126,11 +138,11 @@ const Thunder: React.FC = () => {
))}