diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 26e2000ab..8dfc9b38c 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -58,7 +58,7 @@ To run the landing page If you are having issues ensure you are using the following versions of Rust and Node: -- Rust version: **1.63.0** +- Rust version: **1.64.0** - Node version: **17** ##### Mobile app @@ -72,7 +72,7 @@ To run mobile app - `cd apps/mobile && pnpm i` - This is a separate workspace, you need to do this! - `pnpm android` - runs on Android Emulator - `pnpm ios` - runs on iOS Emulator -- `pnpm dev` - For already bundled app - This is only temporarily supported. The final app will require the Spacedrive Rust code which isn't included in Expo Go. +- `pnpm start` - For already bundled app ### Pull Request diff --git a/packages/interface/src/components/dialog/CreateLibraryDialog.tsx b/packages/interface/src/components/dialog/CreateLibraryDialog.tsx index 11a400ce4..6ee5faa54 100644 --- a/packages/interface/src/components/dialog/CreateLibraryDialog.tsx +++ b/packages/interface/src/components/dialog/CreateLibraryDialog.tsx @@ -16,9 +16,11 @@ export default function CreateLibraryDialog({ const { mutate: createLibrary, isLoading: createLibLoading } = useBridgeMutation( 'library.create', { - onSuccess: (library) => { + onSuccess: (library: any) => { console.log('SUBMITTING'); + setOpenCreateModal(false); + queryClient.setQueryData(['library.list'], (libraries: any) => [ ...(libraries || []), library @@ -26,7 +28,7 @@ export default function CreateLibraryDialog({ if (onSubmit) onSubmit(); }, - onError: (err) => { + onError: (err: any) => { console.error(err); } } diff --git a/packages/interface/src/components/dialog/DeleteLibraryDialog.tsx b/packages/interface/src/components/dialog/DeleteLibraryDialog.tsx index e835989ca..d6090bef3 100644 --- a/packages/interface/src/components/dialog/DeleteLibraryDialog.tsx +++ b/packages/interface/src/components/dialog/DeleteLibraryDialog.tsx @@ -1,4 +1,5 @@ import { useBridgeMutation } from '@sd/client'; +import { useQueryClient } from '@tanstack/react-query'; import { useState } from 'react'; import Dialog from '../layout/Dialog'; @@ -11,9 +12,12 @@ interface Props { export default function DeleteLibraryDialog(props: Props) { const [openDeleteModal, setOpenDeleteModal] = useState(false); + const queryClient = useQueryClient(); + const { mutate: deleteLib, isLoading: libDeletePending } = useBridgeMutation('library.delete', { onSuccess: () => { setOpenDeleteModal(false); + queryClient.invalidateQueries(['library.list']); } }); diff --git a/packages/interface/src/components/layout/Dialog.tsx b/packages/interface/src/components/layout/Dialog.tsx index ed8c2970d..dafd490fc 100644 --- a/packages/interface/src/components/layout/Dialog.tsx +++ b/packages/interface/src/components/layout/Dialog.tsx @@ -24,12 +24,7 @@ export default function Dialog(props: DialogProps) { -
{ - if (props.ctaAction) props.ctaAction(); - e.preventDefault(); - }} - > + e.preventDefault()}>
{props.title} @@ -48,6 +43,7 @@ export default function Dialog(props: DialogProps) {