Skip to content

Commit

Permalink
feat: 빌드 실패 이슈 해결
Browse files Browse the repository at this point in the history
  • Loading branch information
G-hoon committed Nov 4, 2024
1 parent 351e5d6 commit 3fe9f81
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 4 deletions.
5 changes: 4 additions & 1 deletion src/components/Modal/ToWithdrawModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,10 @@ const ToWithdrawModal = (props: ModalProps): React.ReactElement => {
<div className="flex gap-4">
<button
className="w-[256px] rounded-[40px] bg-zinc-100 px-10 py-3 text-base font-semibold text-zinc-500"
onClick={onSubmit}
onClick={(e) => {
e.preventDefault()
onSubmit?.()
}}
>
탈퇴하러 가기
</button>
Expand Down
5 changes: 4 additions & 1 deletion src/components/Modal/WithdrawCrewModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,10 @@ const WithdrawCrewModal = (props: ModalProps): React.ReactElement => {
<div className="flex gap-4">
<button
className="w-[256px] rounded-[40px] bg-zinc-100 px-10 py-3 text-base font-semibold text-zinc-500"
onClick={onSubmit}
onClick={(e) => {
e.preventDefault()
onSubmit?.()
}}
>
네, 탈퇴할게요
</button>
Expand Down
2 changes: 1 addition & 1 deletion src/contexts/ModalsContext.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { ComponentType, createContext } from "react"
export type ModalProps = {
id?: number
onClose?: () => void
onSubmit?: (value?: string) => void
onSubmit?: (() => void) | ((value?: string) => void)
}

export type ModalComponent = ComponentType<any>
Expand Down
2 changes: 1 addition & 1 deletion src/hooks/useMyGroup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { useCallback, useEffect, useMemo } from "react"

export default function useMyGroup() {
const queryClient = useQueryClient()
const myName = useAuthStore((state) => state.user.nickname)
const myName = useAuthStore((state) => state.user?.nickname)
const { myGroupData, setMyGroupData } = useMyGroupStore()

// Fetch group data
Expand Down

0 comments on commit 3fe9f81

Please sign in to comment.