From 8eb3143c7e98ab7196171517b7bb73f77c51ffef Mon Sep 17 00:00:00 2001 From: Muhammad Adeel Tajamul <77053848+muhammadadeeltajamul@users.noreply.github.com> Date: Thu, 6 Oct 2022 06:04:41 +0500 Subject: [PATCH] feat: remove support for discussion mfe in iframe (#308) Co-authored-by: adeel.tajamul --- .../discussions-home/DiscussionsHome.jsx | 8 ++-- .../discussions-home/DiscussionsHome.test.jsx | 37 +++---------------- 2 files changed, 9 insertions(+), 36 deletions(-) diff --git a/src/discussions/discussions-home/DiscussionsHome.jsx b/src/discussions/discussions-home/DiscussionsHome.jsx index 02619666..dbe25187 100644 --- a/src/discussions/discussions-home/DiscussionsHome.jsx +++ b/src/discussions/discussions-home/DiscussionsHome.jsx @@ -46,7 +46,6 @@ export default function DiscussionsHome() { learnerUsername, } = params; const inContext = new URLSearchParams(location.search).get('inContext') !== null; - const inIframe = new URLSearchParams(location.search).get('inIframe')?.toLowerCase() === 'true'; // Display the content area if we are currently viewing/editing a post or creating one. const displayContentArea = postId || postEditorVisible || (learnerUsername && postId); let displaySidebar = useSidebarVisible(); @@ -82,10 +81,9 @@ export default function DiscussionsHome() { learnerUsername, }} > - {!inIframe &&
} +
- {!inIframe - && } +
- {!inIframe &&