Skip to content

Commit

Permalink
Issue #2242 feat: Course Editor integration in Admin app
Browse files Browse the repository at this point in the history
  • Loading branch information
Arif-tekdi-technologies committed Oct 22, 2024
1 parent 85c5b7b commit 073980b
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 4 deletions.
8 changes: 4 additions & 4 deletions next.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
},
{
Expand Down
21 changes: 21 additions & 0 deletions src/pages/collection.tsx
Original file line number Diff line number Diff line change
@@ -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 <CollectionEditor />;
};

export default Collection;

export async function getStaticProps({ locale }: any) {
return {
props: {
noLayout: true,
...(await serverSideTranslations(locale, ["common"])),
},
};
}

0 comments on commit 073980b

Please sign in to comment.