File tree Expand file tree Collapse file tree 2 files changed +2
-6
lines changed
Expand file tree Collapse file tree 2 files changed +2
-6
lines changed Original file line number Diff line number Diff line change 11import { useMutation } from '@tanstack/react-query' ;
22import updateHostInfo from '../api/host' ;
33import { UpdateHostChannelInfoRequest } from '../model/host' ;
4- import { useParams } from 'react-router-dom' ;
5-
6- export const useUpdateHostChannelInfo = ( ) => {
7- const { id } = useParams ( ) ;
8- const hostChannelId = Number ( id ) ;
94
5+ export const useUpdateHostChannelInfo = ( hostChannelId : number ) => {
106 const mutation = useMutation ( {
117 mutationFn : ( dto : UpdateHostChannelInfoRequest ) => updateHostInfo ( hostChannelId , dto ) ,
128 } ) ;
Original file line number Diff line number Diff line change @@ -20,7 +20,7 @@ const HostEditPage = () => {
2020
2121 const hostChannelId = Number ( id ) ;
2222 const { data : hostInfo } = useHostChannelInfo ( hostChannelId ) ;
23- const { mutate } = useUpdateHostChannelInfo ( ) ;
23+ const { mutate } = useUpdateHostChannelInfo ( hostChannelId ) ;
2424 const queryClient = useQueryClient ( ) ;
2525
2626 const handeHostInfoClick = ( ) => {
You can’t perform that action at this time.
0 commit comments