task-d.7.12
This commit is contained in:
@@ -1,7 +1,12 @@
|
||||
'use client';
|
||||
|
||||
import { useMutation } from '@tanstack/react-query';
|
||||
import { commitSetupCsvFiles, previewSetupCsvFiles } from './service';
|
||||
import {
|
||||
commitBootstrapCsvStep,
|
||||
commitSetupCsvFiles,
|
||||
previewBootstrapCsvStep,
|
||||
previewSetupCsvFiles
|
||||
} from './service';
|
||||
|
||||
export function useCsvPreview() {
|
||||
return useMutation({
|
||||
@@ -15,3 +20,22 @@ export function useCsvCommit() {
|
||||
commitSetupCsvFiles(input)
|
||||
});
|
||||
}
|
||||
|
||||
export function useBootstrapCsvPreview() {
|
||||
return useMutation({
|
||||
mutationFn: (input: { stepKey: string; file: File; bootstrapToken?: string }) =>
|
||||
previewBootstrapCsvStep(input)
|
||||
});
|
||||
}
|
||||
|
||||
export function useBootstrapCsvCommit() {
|
||||
return useMutation({
|
||||
mutationFn: (input: {
|
||||
stepKey: string;
|
||||
file: File;
|
||||
previewHash: string;
|
||||
dryRun?: boolean;
|
||||
bootstrapToken?: string;
|
||||
}) => commitBootstrapCsvStep(input)
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user