-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #260 from Nexters/feature/show-setting
공연 설정 팝업 구현
- Loading branch information
Showing
46 changed files
with
1,258 additions
and
684 deletions.
There are no files selected for viewing
7 changes: 0 additions & 7 deletions
7
...dmin/src/components/AuthoritySettingDialogContent/AuthoritySettingDialogContent.styles.ts
This file was deleted.
Oops, something went wrong.
22 changes: 0 additions & 22 deletions
22
apps/admin/src/components/AuthoritySettingDialogContent/index.tsx
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
32 changes: 32 additions & 0 deletions
32
apps/admin/src/components/ShowDeleteDialogContent/index.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
import { useDeleteShow, useShowDetail } from '@boolti/api'; | ||
import ShowDeleteForm from '../ShowDeleteForm'; | ||
import { useToast } from '@boolti/ui'; | ||
|
||
interface ShowDeleteDialogContentProps { | ||
showId: number; | ||
} | ||
|
||
const ShowDeleteDialogContent: React.FC<ShowDeleteDialogContentProps> = ({ showId }) => { | ||
const { data: show } = useShowDetail(showId); | ||
const deleteShowMutation = useDeleteShow(); | ||
|
||
const toast = useToast(); | ||
|
||
if (!show) return; | ||
|
||
return ( | ||
<ShowDeleteForm | ||
showName={show.name} | ||
onSubmit={async () => { | ||
try { | ||
await deleteShowMutation.mutateAsync(showId); | ||
toast.success('공연을 삭제했습니다.'); | ||
} catch (_) { | ||
toast.error('공연을 삭제하지 못했습니다. 잠시 후 다시 시도해주세요.'); | ||
} | ||
}} | ||
/> | ||
); | ||
}; | ||
|
||
export default ShowDeleteDialogContent; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.