Skip to content

Commit a7a4435

Browse files
authored
Merge pull request #120 from DDD-Community/feat/#118
feat: 빌드 실패 이슈 해결
2 parents ddddae4 + 3fe9f81 commit a7a4435

File tree

4 files changed

+10
-4
lines changed

4 files changed

+10
-4
lines changed

src/components/Modal/ToWithdrawModal.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,10 @@ const ToWithdrawModal = (props: ModalProps): React.ReactElement => {
2222
<div className="flex gap-4">
2323
<button
2424
className="w-[256px] rounded-[40px] bg-zinc-100 px-10 py-3 text-base font-semibold text-zinc-500"
25-
onClick={onSubmit}
25+
onClick={(e) => {
26+
e.preventDefault()
27+
onSubmit?.()
28+
}}
2629
>
2730
탈퇴하러 가기
2831
</button>

src/components/Modal/WithdrawCrewModal.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,10 @@ const WithdrawCrewModal = (props: ModalProps): React.ReactElement => {
2020
<div className="flex gap-4">
2121
<button
2222
className="w-[256px] rounded-[40px] bg-zinc-100 px-10 py-3 text-base font-semibold text-zinc-500"
23-
onClick={onSubmit}
23+
onClick={(e) => {
24+
e.preventDefault()
25+
onSubmit?.()
26+
}}
2427
>
2528
네, 탈퇴할게요
2629
</button>

src/contexts/ModalsContext.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { ComponentType, createContext } from "react"
33
export type ModalProps = {
44
id?: number
55
onClose?: () => void
6-
onSubmit?: (value?: string) => void
6+
onSubmit?: (() => void) | ((value?: string) => void)
77
}
88

99
export type ModalComponent = ComponentType<any>

src/hooks/useMyGroup.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import { useCallback, useEffect, useMemo } from "react"
66

77
export default function useMyGroup() {
88
const queryClient = useQueryClient()
9-
const myName = useAuthStore((state) => state.user.nickname)
9+
const myName = useAuthStore((state) => state.user?.nickname)
1010
const { myGroupData, setMyGroupData } = useMyGroupStore()
1111

1212
// Fetch group data

0 commit comments

Comments
 (0)