From 5e2c6195844c76448f9f8dc0d1fb5a47368d0985 Mon Sep 17 00:00:00 2001 From: jaeyo03 Date: Sun, 9 Feb 2025 22:08:11 +0900 Subject: [PATCH] =?UTF-8?q?feat=20:=20=EB=A7=88=EC=9D=B4=ED=8E=98=EC=9D=B4?= =?UTF-8?q?=EC=A7=80=20=EB=B9=88=20=EC=9D=BC=EC=A0=95=EC=8B=9C=20=EC=9D=B4?= =?UTF-8?q?=EB=8F=99=20=EA=B8=B0=EB=8A=A5=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/MyPage/components/main/common/NoContent.jsx | 5 +++-- .../MyPage/components/main/schedule/ScheduleSection.jsx | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/pages/MyPage/components/main/common/NoContent.jsx b/src/pages/MyPage/components/main/common/NoContent.jsx index 1da6df9..78309ba 100644 --- a/src/pages/MyPage/components/main/common/NoContent.jsx +++ b/src/pages/MyPage/components/main/common/NoContent.jsx @@ -1,9 +1,9 @@ import PropTypes from 'prop-types'; -const NoContent = ({ children }) => { +const NoContent = ({ onClick, children }) => { return (
- 한라봉 캐릭터 이미지 + 한라봉 캐릭터 이미지

{children}

); @@ -12,5 +12,6 @@ const NoContent = ({ children }) => { export default NoContent; NoContent.propTypes = { + onClick: PropTypes.func, children: PropTypes.node, }; diff --git a/src/pages/MyPage/components/main/schedule/ScheduleSection.jsx b/src/pages/MyPage/components/main/schedule/ScheduleSection.jsx index 8969ac2..ab96369 100644 --- a/src/pages/MyPage/components/main/schedule/ScheduleSection.jsx +++ b/src/pages/MyPage/components/main/schedule/ScheduleSection.jsx @@ -5,11 +5,12 @@ import { deleteTripApi, getAllTripsApi } from '@/apis/supabaseApi'; import MyPageHeader from '../common/MyPageHeader'; import NoContent from '../common/NoContent'; import Schedule from './Schedule'; +import { useNavigate } from 'react-router-dom'; const ScheduleSection = () => { const [scheduleData, setScheduleData] = useState([]); - const { userId } = useSelector(state => state.user); + const navigate = useNavigate(); const fetchScheduleData = async userId => { try { @@ -54,7 +55,7 @@ const ScheduleSection = () => { > )) ) : ( - 일정을 등록해주세요! + navigate('/trip/add-trip')}>아이콘을 눌러 일정을 등록해주세요! )}