mirror of
https://github.com/jeffvli/feishin.git
synced 2026-05-08 13:00:13 +02:00
restructure files onto electron-vite boilerplate
This commit is contained in:
@@ -2,10 +2,12 @@ import { Box, Group, Stack, TextInput } from '@mantine/core';
|
||||
import { DateTimePicker } from '@mantine/dates';
|
||||
import { useForm } from '@mantine/form';
|
||||
import { closeModal, ContextModalProps } from '@mantine/modals';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
|
||||
import { useShareItem } from '../mutations/share-item-mutation';
|
||||
|
||||
import { Button, Switch, toast } from '/@/renderer/components';
|
||||
import { useCurrentServer } from '/@/renderer/store';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { useShareItem } from '../mutations/share-item-mutation';
|
||||
|
||||
export const ShareItemContextModal = ({
|
||||
id,
|
||||
@@ -122,9 +124,9 @@ export const ShareItemContextModal = ({
|
||||
<Group position="right">
|
||||
<Group>
|
||||
<Button
|
||||
onClick={() => closeModal(id)}
|
||||
size="md"
|
||||
variant="subtle"
|
||||
onClick={() => closeModal(id)}
|
||||
>
|
||||
{t('common.cancel', { postProcess: 'titleCase' })}
|
||||
</Button>
|
||||
|
||||
@@ -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