diff --git a/src/components/Footer.tsx b/src/components/Footer.tsx index dae17f1..bded352 100644 --- a/src/components/Footer.tsx +++ b/src/components/Footer.tsx @@ -50,7 +50,7 @@ const Footer: React.FC = () => { -

© 2024 ModongPage. All rights reserved.

+

© 2024 ModongPage. All rights reserved.

); }; diff --git a/src/components/HeroSection.tsx b/src/components/HeroSection.tsx index 04c966d..ece43cf 100644 --- a/src/components/HeroSection.tsx +++ b/src/components/HeroSection.tsx @@ -5,7 +5,8 @@ interface HeroSectionProps { backgroundColor: string; title: string; subtitle: string; - animationData: object; + animationData?: object; + imageData?: { src: string; alt: string }; } const HeroSection: React.FC = ({ @@ -13,24 +14,35 @@ const HeroSection: React.FC = ({ title, subtitle, animationData, + imageData, }) => { return (
-
-
+
+

{title}

{subtitle}

- + {animationData ? ( + + ) : ( + imageData && ( + {imageData.alt} + ) + )}
); diff --git a/src/pages/GroupJoinPage/ClubRegistration.tsx b/src/pages/GroupJoinPage/ClubRegistration.tsx new file mode 100644 index 0000000..1170f6b --- /dev/null +++ b/src/pages/GroupJoinPage/ClubRegistration.tsx @@ -0,0 +1,53 @@ +import React from "react"; +import { Button } from '@/components/ui/button'; + +const ClubRegistration: React.FC = () => { + return ( +
+
+

개인정보 이용약관

+

가입 규칙

+
+
    +
  1. 가입 후 3개월 동안 참여 횟수 3회 미만일 경우 강퇴!!
  2. +
  3. 상호 존중
  4. +
  5. 이성적 만남, 영업 등 동아리와 관련되지 않은 목적 적발시 강퇴!!
  6. +
  7. 가입 후 일주일 내 인사 등록 및 한달 내 모임 참여
  8. +
+
+ + +

가입 질문

+
+
+ + +
+
+ + +
+
+ + +
+
+ +
+ +
+ +
+
+
+
+ ); +} + +export default ClubRegistration; diff --git a/src/pages/GroupJoinPage/GroupJoinPage.tsx b/src/pages/GroupJoinPage/GroupJoinPage.tsx new file mode 100644 index 0000000..cec574c --- /dev/null +++ b/src/pages/GroupJoinPage/GroupJoinPage.tsx @@ -0,0 +1,89 @@ +import React, { useRef, useState } from 'react'; +import Footer from '@/components/Footer'; +import Header from '@/components/Header'; +import HeroSection from '@/components/HeroSection'; +import NotificationModal from '@/components/ui/notificationModal'; +import ProfileModal from '@/components/ui/profileModal'; +import ClubRegistration from './ClubRegistration'; +import runImg from '@/assets/icons/run.png'; + + +const LandingPage: React.FC = () => { + const [isProfileModalOpen, setIsProfileModalOpen] = useState(false); + const [isNotificationModalOpen, setIsNotificationModalOpen] = useState(false); + const [isLoggedIn, setIsLoggedIn] = useState(false); + const [hasNotifications, setHasNotifications] = useState(false); + const [profileCoords, setProfileCoords] = useState<{ + top: number; + left: number; + }>({ + top: 0, + left: 0, + }); + const [notificationCoords, setNotificationCoords] = useState<{ + top: number; + left: number; + }>({ + top: 0, + left: 0, + }); + const profileRef = useRef(null); + + const toggleProfileModal = (e?: React.MouseEvent) => { + if (e) { + const rect = (e.currentTarget as HTMLElement).getBoundingClientRect(); + setProfileCoords({ top: rect.bottom, left: rect.left }); + } + setIsProfileModalOpen(!isProfileModalOpen); + }; + + const toggleNotificationModal = (e?: React.MouseEvent) => { + if (e) { + const rect = (e.currentTarget as HTMLElement).getBoundingClientRect(); + setNotificationCoords({ top: rect.bottom, left: rect.left }); + } + setIsNotificationModalOpen(!isNotificationModalOpen); + }; + + const handleLogout = () => { + setIsLoggedIn(false); + setIsProfileModalOpen(false); + }; + + return ( +
+
setIsLoggedIn(!isLoggedIn)} + profileRef={profileRef} + hasNotifications={hasNotifications} + /> + + +
+ {isProfileModalOpen && ( + + )} + {isNotificationModalOpen && ( + + )} +
+ ); +}; + +export default LandingPage; diff --git a/src/pages/GroupJoinPage/Join b/src/pages/GroupJoinPage/Join new file mode 100644 index 0000000..e69de29 diff --git a/src/routes/routes.tsx b/src/routes/routes.tsx index bf58cab..dc9ee8c 100644 --- a/src/routes/routes.tsx +++ b/src/routes/routes.tsx @@ -2,7 +2,7 @@ import { createBrowserRouter, RouterProvider } from 'react-router-dom'; import App from '../App'; import Landing from '../pages/LandingPage/LandingPage'; import SetLocation from '../pages/SetLocation/SetLocation'; - +import GroupJoin from '../pages/GroupJoinPage/GroupJoinPage'; const router = createBrowserRouter([ { path: '/', @@ -17,6 +17,10 @@ const router = createBrowserRouter([ path: '/setlocation', element: , }, + { + path: '/groupjoin', + element: , + }, ]); const Routes = () => {