mirror of
https://github.com/colanode/colanode.git
synced 2025-12-29 00:25:03 +01:00
Fix bugs with workspaces query, form and mutation
This commit is contained in:
@@ -33,7 +33,7 @@ export class WorkspaceListQueryHandler
|
||||
): Promise<ChangeCheckResult<WorkspaceListQueryInput>> {
|
||||
if (
|
||||
!changes.some(
|
||||
(change) => change.type === 'app' && change.table === 'accounts',
|
||||
(change) => change.type === 'app' && change.table === 'workspaces',
|
||||
)
|
||||
) {
|
||||
return {
|
||||
|
||||
@@ -32,8 +32,8 @@ export const WorkspaceCreate = () => {
|
||||
accountId: account.id,
|
||||
avatar: values.avatar,
|
||||
},
|
||||
onSuccess(id) {
|
||||
navigate(`/${id}`);
|
||||
onSuccess(output) {
|
||||
navigate(`/${output.id}`);
|
||||
},
|
||||
onError() {
|
||||
toast({
|
||||
|
||||
@@ -25,7 +25,7 @@ import { Upload } from 'lucide-react';
|
||||
const formSchema = z.object({
|
||||
name: z.string().min(3, 'Name must be at least 3 characters long.'),
|
||||
description: z.string(),
|
||||
avatar: z.string().optional(),
|
||||
avatar: z.string().optional().nullable(),
|
||||
});
|
||||
|
||||
type formSchemaType = z.infer<typeof formSchema>;
|
||||
|
||||
Reference in New Issue
Block a user