mirror of
https://github.com/jeffvli/feishin.git
synced 2026-06-11 06:42:38 +02:00
restructure files onto electron-vite boilerplate
This commit is contained in:
@@ -1,7 +1,8 @@
|
||||
import { useMutation } from '@tanstack/react-query';
|
||||
import { AnyLibraryItems, ShareItemResponse, ShareItemArgs } from '/@/renderer/api/types';
|
||||
import { AxiosError } from 'axios';
|
||||
|
||||
import { api } from '/@/renderer/api';
|
||||
import { AnyLibraryItems, ShareItemArgs, ShareItemResponse } from '/@/renderer/api/types';
|
||||
import { MutationHookArgs } from '/@/renderer/lib/react-query';
|
||||
import { getServerById } from '/@/renderer/store';
|
||||
|
||||
@@ -11,8 +12,8 @@ export const useShareItem = (args: MutationHookArgs) => {
|
||||
return useMutation<
|
||||
ShareItemResponse,
|
||||
AxiosError,
|
||||
Omit<ShareItemArgs, 'server' | 'apiClientProps'>,
|
||||
{ previous: { items: AnyLibraryItems } | undefined }
|
||||
Omit<ShareItemArgs, 'apiClientProps' | 'server'>,
|
||||
{ previous: undefined | { items: AnyLibraryItems } }
|
||||
>({
|
||||
mutationFn: (args) => {
|
||||
const server = getServerById(args.serverId);
|
||||
|
||||
Reference in New Issue
Block a user