diff --git a/src/pages/Layout/MainLayout/MemberSection/SelectFriendSection/SelectFriendHeader/index.tsx b/src/pages/Layout/MainLayout/MemberSection/SelectFriendSection/SelectFriendHeader/index.tsx index 6819a21..cf48020 100644 --- a/src/pages/Layout/MainLayout/MemberSection/SelectFriendSection/SelectFriendHeader/index.tsx +++ b/src/pages/Layout/MainLayout/MemberSection/SelectFriendSection/SelectFriendHeader/index.tsx @@ -1,4 +1,5 @@ import { BiCheckCircle, BiUserCheck } from 'react-icons/bi' +import { useNavigate } from 'react-router-dom' import { Box, Text, useDisclosure } from '@chakra-ui/react' import { useMutation, useQueryClient } from '@tanstack/react-query' @@ -20,6 +21,7 @@ export const SelectFreindHeader = ({ }: SelectFreindHeaderProps) => { const queryClient = useQueryClient() const { isOpen, onOpen, onClose } = useDisclosure() + const navigate = useNavigate() const setMemberType = useMemberTypeStore((state) => state.setMemberType) const friendList = useFriendStore((state) => state.friendList()) @@ -62,6 +64,7 @@ export const SelectFreindHeader = ({ onClose={() => { onClose() setMemberType('FRIEND') + navigate(0) }} icon={} title="친구 설정이 완료되었습니다." diff --git a/src/pages/MainPage/UseProfilehook/index.ts b/src/pages/MainPage/UseProfilehook/index.ts index 7d27e63..ede3802 100644 --- a/src/pages/MainPage/UseProfilehook/index.ts +++ b/src/pages/MainPage/UseProfilehook/index.ts @@ -7,6 +7,7 @@ import { Friend } from '@/types' const useProfile = () => { const { data: all } = useSuspenseQuery(friendsQueries.myFriends()) + const [remain, setRemain] = useState([]) const [picked, setPicked] = useState([])