diff --git a/src/pages/Trip/Trip.tsx b/src/pages/Trip/Trip.tsx index fd305b56..d65f5316 100644 --- a/src/pages/Trip/Trip.tsx +++ b/src/pages/Trip/Trip.tsx @@ -8,76 +8,54 @@ import { TabPanels, Tabs, useDisclosure, -} from "@chakra-ui/react"; -import { useEffect, useRef, useState } from "react"; -import { AiOutlineBell as AlarmIcon } from "react-icons/ai"; -import { AiOutlineMenu as MenuIcon } from "react-icons/ai"; -import { FiPlus as PlusIcon } from "react-icons/fi"; -import { useNavigate } from "react-router-dom"; +} from '@chakra-ui/react'; +import {useEffect, useRef, useState} from 'react'; +import {AiOutlineBell as AlarmIcon} from 'react-icons/ai'; +import {AiOutlineMenu as MenuIcon} from 'react-icons/ai'; +import {FiPlus as PlusIcon} from 'react-icons/fi'; -import styles from "./Trip.module.scss"; +import styles from './Trip.module.scss'; -import Alarm from "@/components/Alarm/Alarm"; -import BottomSlide from "@/components/BottomSlide/BottomSlide"; -import RouteTabPanel from "@/components/Route/RouteTabPanel/RouteTabPanel"; -import SlideBar from "@/components/SideBar/SideBar"; -import EditTripSpace from "@/components/TripSpace/EditTripSpace/EditTripSpace"; -import FriendList from "@/components/TripSpace/FriendList/FriendList"; -import InviteFriends from "@/components/TripSpace/InviteFriends/InviteFriends"; -import VoteTabPanel from "@/components/VoteTabPanel/VoteTabPanel"; +import Alarm from '@/components/Alarm/Alarm'; +import BottomSlide from '@/components/BottomSlide/BottomSlide'; +import RouteTabPanel from '@/components/Route/RouteTabPanel/RouteTabPanel'; +import SlideBar from '@/components/SideBar/SideBar'; +import EditTripSpace from '@/components/TripSpace/EditTripSpace/EditTripSpace'; +import FriendList from '@/components/TripSpace/FriendList/FriendList'; +import InviteFriends from '@/components/TripSpace/InviteFriends/InviteFriends'; +import VoteTabPanel from '@/components/VoteTabPanel/VoteTabPanel'; -import { LatLng } from "@/types/route"; +import {LatLng} from '@/types/route'; function Trip() { // 임시 데이터 const users = [ - { name: "김철수", src: "" }, - { name: "나철수", src: "" }, - { name: "다철수", src: "https://bit.ly/kent-c-dodds" }, - { name: "라철수", src: "https://bit.ly/prosper-baba" }, - { name: "마철수", src: "https://bit.ly/code-beast" }, + {name: '김철수', src: ''}, + {name: '나철수', src: ''}, + {name: '다철수', src: 'https://bit.ly/kent-c-dodds'}, + {name: '라철수', src: 'https://bit.ly/prosper-baba'}, + {name: '마철수', src: 'https://bit.ly/code-beast'}, ]; - const navigate = useNavigate(); const [selectedTabIndex, setSelectedTabIndex] = useState(0); const mapRef = useRef(null); - const [center, setCenter] = useState({ lat: 37, lng: 131 }); // 기준: 독도 + const [center, setCenter] = useState({lat: 37, lng: 131}); // 기준: 독도 - const { - isOpen: isBottomSlideOpen, - onOpen: onBottomSlideOpen, - onClose: onBottomSlideClose, - } = useDisclosure(); - const { - isOpen: isSlideBarOpen, - onOpen: onSlideBarOpen, - onClose: onSlideBarClose, - } = useDisclosure(); + const {isOpen: isBottomSlideOpen, onOpen: onBottomSlideOpen, onClose: onBottomSlideClose} = useDisclosure(); + const {isOpen: isSlideBarOpen, onOpen: onSlideBarOpen, onClose: onSlideBarClose} = useDisclosure(); - const { - isOpen: isInviteOpen, - onOpen: onInviteOpen, - onClose: onInviteClose, - } = useDisclosure(); + const {isOpen: isInviteOpen, onOpen: onInviteOpen, onClose: onInviteClose} = useDisclosure(); - const { - isOpen: isFriendListOpen, - onOpen: onFriendListOpen, - onClose: onFriendListClose, - } = useDisclosure(); + const {isOpen: isFriendListOpen, onOpen: onFriendListOpen, onClose: onFriendListClose} = useDisclosure(); - const { - isOpen: isAlarmOpen, - onOpen: onAlarmOpen, - onClose: onAlarmClose, - } = useDisclosure(); + const {isOpen: isAlarmOpen, onOpen: onAlarmOpen, onClose: onAlarmClose} = useDisclosure(); useEffect(() => { const map = mapRef.current; if (map) { map.relayout(); - setCenter({ lat: 37.76437082535426, lng: 128.87675285339355 }); + setCenter({lat: 37.76437082535426, lng: 128.87675285339355}); } }, [selectedTabIndex]); @@ -86,48 +64,29 @@ function Trip() {
D-day
-
- 여행지를 정해주세요 -
+
여행지를 정해주세요
- - 날짜를 정해주세요 - -
-
- setSelectedTabIndex(index)} - > + setSelectedTabIndex(index)}>
투표 - + 일정
- + @@ -176,21 +126,9 @@ function Trip() {
- } - /> - } - /> - } - /> + } /> + } /> + } />