From df5abfbca0f2a6af140583d5fdffa8fea214c281 Mon Sep 17 00:00:00 2001 From: Hina Khadim Date: Mon, 2 Dec 2024 20:17:11 +0500 Subject: [PATCH 1/5] fix: update env.config.jsx according to tutor-mfe#240 PR --- .../mfe-env-config-buildtime-definitions} | 37 ------ .../patches/mfe-env-config-buildtime-imports | 4 + .../mfe-env-config-runtime-definitions | 2 + tutorindigo/plugin.py | 115 ++++++++++-------- 4 files changed, 67 insertions(+), 91 deletions(-) rename tutorindigo/{templates/indigo/env.config.jsx => patches/mfe-env-config-buildtime-definitions} (75%) create mode 100644 tutorindigo/patches/mfe-env-config-buildtime-imports create mode 100644 tutorindigo/patches/mfe-env-config-runtime-definitions diff --git a/tutorindigo/templates/indigo/env.config.jsx b/tutorindigo/patches/mfe-env-config-buildtime-definitions similarity index 75% rename from tutorindigo/templates/indigo/env.config.jsx rename to tutorindigo/patches/mfe-env-config-buildtime-definitions index ca3b7044..96bf159b 100644 --- a/tutorindigo/templates/indigo/env.config.jsx +++ b/tutorindigo/patches/mfe-env-config-buildtime-definitions @@ -1,9 +1,4 @@ -import React, { useEffect } from 'react'; -import Cookies from 'universal-cookie'; -import Footer from '@edly-io/indigo-frontend-component-footer'; -import { getConfig } from '@edx/frontend-platform'; -import { DIRECT_PLUGIN, PLUGIN_OPERATIONS } from '@openedx/frontend-plugin-framework'; let themeCookie = 'indigo-toggle-dark'; let themeCookieExpiry = 90; // days @@ -70,35 +65,3 @@ const AddDarkTheme = () => { return (
); }; - -const themePluginSlot = { - keepDefault: false, - plugins: [ - { - op: PLUGIN_OPERATIONS.Insert, - widget: { - id: 'default_contents', - type: DIRECT_PLUGIN, - priority: 1, - RenderWidget: