page wrapper
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import { useMutation } from '@tanstack/react-query';
|
||||
import { useServices } from '@/lib/services/ServiceProvider';
|
||||
import { useInject } from '@/lib/di/hooks/useInject';
|
||||
import { LEAGUE_SERVICE_TOKEN } from '@/lib/di/tokens';
|
||||
import { CreateLeagueInputDTO } from '@/lib/types/generated/CreateLeagueInputDTO';
|
||||
import { CreateLeagueOutputDTO } from '@/lib/types/generated/CreateLeagueOutputDTO';
|
||||
|
||||
@@ -61,7 +62,7 @@ export interface LeagueWizardFormModel {
|
||||
}
|
||||
|
||||
export function useCreateLeagueWizard() {
|
||||
const { leagueService } = useServices();
|
||||
const leagueService = useInject(LEAGUE_SERVICE_TOKEN);
|
||||
|
||||
return useMutation({
|
||||
mutationFn: async (params: { form: LeagueWizardFormModel; ownerId: string }): Promise<CreateLeagueOutputDTO> => {
|
||||
@@ -79,4 +80,4 @@ export function useCreateLeagueWizard() {
|
||||
return result;
|
||||
},
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user