From 6d95ec1e810a5bfed2aaa39d73e260f66bbd3678 Mon Sep 17 00:00:00 2001 From: Arif-tekdi-technologies Date: Thu, 7 Nov 2024 11:53:17 +0530 Subject: [PATCH] Issue #2242 feat: Course Editor integration in Admin app --- src/{pages/play/content => data}/player-config.ts | 0 src/pages/play/content/[identifier].tsx | 11 +++++++---- 2 files changed, 7 insertions(+), 4 deletions(-) rename src/{pages/play/content => data}/player-config.ts (100%) diff --git a/src/pages/play/content/player-config.ts b/src/data/player-config.ts similarity index 100% rename from src/pages/play/content/player-config.ts rename to src/data/player-config.ts diff --git a/src/pages/play/content/[identifier].tsx b/src/pages/play/content/[identifier].tsx index b311b73c..21068ee4 100644 --- a/src/pages/play/content/[identifier].tsx +++ b/src/pages/play/content/[identifier].tsx @@ -9,15 +9,18 @@ import { } from "@/services/PlayerService"; import { PlayerConfig } from "@/utils/Interfaces"; import { Box } from "@mui/material"; -import { V1PlayerConfig, V2PlayerConfig } from "./player-config"; -import { QUESTIONSET_MIME_TYPE, INTERACTIVE_MIME_TYPE } from "../../../../config.json" +import { V1PlayerConfig, V2PlayerConfig } from "../../../data/player-config"; +import { + QUESTIONSET_MIME_TYPE, + INTERACTIVE_MIME_TYPE, +} from "../../../../config.json"; // @ts-ignore const SunbirdPlayers = dynamic(() => import("editor/SunbirdPlayers"), { ssr: false, }); -let playerConfig = {config: {}, context: {}, metadata: {}, data: {}}; +let playerConfig = { config: {}, context: {}, metadata: {}, data: {} }; interface SunbirdPlayerProps { playerConfig: PlayerConfig; @@ -44,7 +47,7 @@ const players: React.FC = () => { const metadata = { ...Q1?.questionset, ...Q2?.questionset }; playerConfig.metadata = metadata; console.log("playerConfig", playerConfig); - } else if(INTERACTIVE_MIME_TYPE.includes(data?.mimeType)) { + } else if (INTERACTIVE_MIME_TYPE.includes(data?.mimeType)) { playerConfig = V1PlayerConfig; playerConfig.metadata = data; } else {