Fixing console errors and adding category modal

This commit is contained in:
ajnart
2023-01-02 01:44:24 +09:00
parent 8a1b44fd27
commit 38815d754f
7 changed files with 94 additions and 77 deletions

View File

@@ -36,7 +36,7 @@ export const CategoryEditModal = ({
return (
<form onSubmit={form.onSubmit(handleSubmit)}>
<TextInput data-autoFocus {...form.getInputProps('name')} label="Name of category" />
<TextInput data-autoFocus {...form.getInputProps('name')} autoFocus />
<Group mt="md" grow>
<Button onClick={() => context.closeModal(id)} variant="filled" color="gray">

View File

@@ -210,6 +210,7 @@ export const useCategoryActions = (configName: string | undefined, category: Cat
const edit = async () => {
openContextModalGeneric<CategoryEditModalInnerProps>({
modal: 'categoryEditModal',
withCloseButton: false,
innerProps: {
category,
onSuccess: async (category) => {