mirror of
https://github.com/antebudimir/feishin.git
synced 2026-01-02 19:01:40 +00:00
restructure files onto electron-vite boilerplate
This commit is contained in:
parent
91ce2cd8a1
commit
1cf587bc8f
457 changed files with 9927 additions and 11705 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue