Skip to content

Commit

Permalink
Fix: 친구 설정 후 새로고침 추가
Browse files Browse the repository at this point in the history
  • Loading branch information
ppochaco committed Nov 8, 2024
1 parent 5be20a5 commit 472fa8d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -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'
Expand All @@ -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())
Expand Down Expand Up @@ -62,6 +64,7 @@ export const SelectFreindHeader = ({
onClose={() => {
onClose()
setMemberType('FRIEND')
navigate(0)
}}
icon={<BiCheckCircle />}
title="친구 설정이 완료되었습니다."
Expand Down
1 change: 1 addition & 0 deletions src/pages/MainPage/UseProfilehook/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import { Friend } from '@/types'

const useProfile = () => {
const { data: all } = useSuspenseQuery(friendsQueries.myFriends())

const [remain, setRemain] = useState<Friend[]>([])
const [picked, setPicked] = useState<Friend[]>([])

Expand Down

0 comments on commit 472fa8d

Please sign in to comment.