From 073980bf094feaee9026688f55f5f78d8c686d8a Mon Sep 17 00:00:00 2001 From: Arif-tekdi-technologies Date: Tue, 22 Oct 2024 13:56:27 +0530 Subject: [PATCH] Issue #2242 feat: Course Editor integration in Admin app --- next.config.mjs | 8 ++++---- src/pages/collection.tsx | 21 +++++++++++++++++++++ 2 files changed, 25 insertions(+), 4 deletions(-) create mode 100644 src/pages/collection.tsx diff --git a/next.config.mjs b/next.config.mjs index 196635c..0b1b14f 100644 --- a/next.config.mjs +++ b/next.config.mjs @@ -47,15 +47,15 @@ const nextConfig = { return [ { source: "/action/asset/v1/upload/:identifier*", // Match asset upload routes - destination: '/api/fileUpload' // Forward asset uploads to fileUpload proxy + destination: "/api/fileUpload", // Forward asset uploads to fileUpload proxy }, { source: "/action/content/v3/upload/url/:identifier*", // Match content upload with 'url' in the path destination: `${process.env.WORKSPACE_BASE_URL}/api/proxy?path=/action/content/v3/upload/url/:identifier*`, // Forward to proxy route with path as query param }, { - source: '/action/content/v3/upload/:identifier*', // Match content upload routes - destination: '/api/fileUpload', // Forward asset uploads to fileUpload proxy + source: "/action/content/v3/upload/:identifier*", // Match content upload routes + destination: "/api/fileUpload", // Forward asset uploads to fileUpload proxy }, { source: "/action/asset/:path*", // Match other /action/asset routes @@ -74,7 +74,7 @@ const nextConfig = { destination: `${process.env.WORKSPACE_BASE_URL}/api/proxy?path=/api/:path*`, // Forward them to proxy.js }, { - source: '/assets/public/:path*', // Match any URL starting with /assets/public/ + source: "/assets/public/:path*", // Match any URL starting with /assets/public/ destination: `${process.env.WORKSPACE_BASE_URL}/assets/public/:path*`, // Forward to workspace proxy }, { diff --git a/src/pages/collection.tsx b/src/pages/collection.tsx new file mode 100644 index 0000000..460499e --- /dev/null +++ b/src/pages/collection.tsx @@ -0,0 +1,21 @@ +import React, { useEffect, useState } from "react"; +import dynamic from "next/dynamic"; +import { serverSideTranslations } from "next-i18next/serverSideTranslations"; + +// @ts-ignore +const CollectionEditor = dynamic(() => import("editor/Collection"), { ssr: false }); + +const Collection = () => { + return ; +}; + +export default Collection; + +export async function getStaticProps({ locale }: any) { + return { + props: { + noLayout: true, + ...(await serverSideTranslations(locale, ["common"])), + }, + }; +}