added chapter view, fixes, added ratings, added chapter updates/deletions

This commit is contained in:
lnn0q 2025-06-01 00:37:26 +03:00
parent 029b7e9353
commit 4801cf3a13
34 changed files with 1345 additions and 191 deletions

View file

@ -1,4 +1,5 @@
import { gql } from '@apollo/client';
import { bookListQuery } from '@app/client/components/BookSearchList';
import { useToastMutation } from '@app/client/hooks/useToastMutation';
import { Heading, Input, Stack, Textarea } from '@chakra-ui/react';
import { Button } from '@client/components/ui/button';
@ -34,7 +35,8 @@ function NewBookForm() {
const navigate = useNavigate();
const { update: bookCreate } = useToastMutation<CreateNewBookMutation>({
mutation: bookCreateMutation,
successMsg: 'Book created successfully!'
successMsg: 'Book created successfully!',
refetchQueries: [bookListQuery]
});
const schema = v.pipe(
@ -64,7 +66,7 @@ function NewBookForm() {
});
if (data != null)
navigate({
to: `/work/book/${data.bookCreate.id}`
to: `/work/book/${data.bookCreate.id}/overview`
});
})}
>