From 394f4e0b5a079cf6d622bd30e6d72d9a87bbfe11 Mon Sep 17 00:00:00 2001 From: swve Date: Mon, 24 Apr 2023 20:46:01 +0200 Subject: [PATCH] fix: collection creation bug --- front/app/_orgs/[orgslug]/(withmenu)/collections/new/page.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/front/app/_orgs/[orgslug]/(withmenu)/collections/new/page.tsx b/front/app/_orgs/[orgslug]/(withmenu)/collections/new/page.tsx index 5a190dec..84421186 100644 --- a/front/app/_orgs/[orgslug]/(withmenu)/collections/new/page.tsx +++ b/front/app/_orgs/[orgslug]/(withmenu)/collections/new/page.tsx @@ -4,7 +4,7 @@ import React from "react"; import { Title } from "@components/UI/Elements/Styles/Title"; import { createCollection } from "@services/courses/collections"; import useSWR from "swr"; -import { getAPIUrl } from "@services/config/config"; +import { getAPIUrl, getUriWithOrg } from "@services/config/config"; import { swrFetcher } from "@services/utils/ts/requests"; import { getOrganizationContextInfo } from "@services/organizations/orgs"; @@ -44,7 +44,7 @@ function NewCollection(params : any) { org_id: org.org_id, }; await createCollection(collection); - router.push("/org/" + orgslug + "/collections"); + router.push(getUriWithOrg(orgslug, "/collections")); };