From 3fdd66d3a8fe8fd676da439f199b28960f50388a Mon Sep 17 00:00:00 2001 From: psiddharthdesign <107192927+psiddharthdesign@users.noreply.github.com> Date: Mon, 22 Jul 2024 19:44:17 +0530 Subject: [PATCH] minor fix --- src/components/CreateOrganizationDialog.tsx | 2 +- src/data/user/organizations.ts | 2 +- src/utils/zod-schemas/organization.ts | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/components/CreateOrganizationDialog.tsx b/src/components/CreateOrganizationDialog.tsx index 0d281a13..e5a0bd85 100644 --- a/src/components/CreateOrganizationDialog.tsx +++ b/src/components/CreateOrganizationDialog.tsx @@ -63,7 +63,7 @@ export function CreateOrganizationDialog({ }, onSuccess: (response) => { if (response.status === "success" && response.data) { - router.push(`/${response.data}`); + router.push(`/org/${response.data}`); } }, }, diff --git a/src/data/user/organizations.ts b/src/data/user/organizations.ts index c90cebe6..257c08e8 100644 --- a/src/data/user/organizations.ts +++ b/src/data/user/organizations.ts @@ -141,7 +141,7 @@ export const createOrganization = async ( } revalidatePath('/org/[organizationId]', 'layout'); - return { status: 'success', data: slug }; + return { status: 'success', data: organizationId }; } catch (error) { console.error('Unexpected error in createOrganization:', error); return { status: 'error', message: 'An unexpected error occurred' }; diff --git a/src/utils/zod-schemas/organization.ts b/src/utils/zod-schemas/organization.ts index fad900b4..081b1ab8 100644 --- a/src/utils/zod-schemas/organization.ts +++ b/src/utils/zod-schemas/organization.ts @@ -1,4 +1,4 @@ -import { z } from "zod"; +import { z } from 'zod'; export const createOrganizationSchema = z.object({ organizationTitle: z.string().min(1),