From 2e18c94bacef1b3b586b20f54adbb28416871a5f Mon Sep 17 00:00:00 2001 From: Dima Alipov Date: Fri, 6 Dec 2024 16:39:25 +0200 Subject: [PATCH] fix: correct redirect to taxonomies page --- src/content-tags-drawer/ContentTagsDrawer.tsx | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/content-tags-drawer/ContentTagsDrawer.tsx b/src/content-tags-drawer/ContentTagsDrawer.tsx index da025f59f..6a7a75b10 100644 --- a/src/content-tags-drawer/ContentTagsDrawer.tsx +++ b/src/content-tags-drawer/ContentTagsDrawer.tsx @@ -1,3 +1,4 @@ +import { getConfig } from '@edx/frontend-platform'; import React, { useContext, useEffect } from 'react'; import { Container, @@ -60,7 +61,13 @@ const TaxonomyList = ({ contentId }: TaxonomyListProps) => { size="inline" variant="link" className="text-info-500 p-0 enable-taxonomies-button" - onClick={() => navigate('/taxonomies')} + onClick={() => { + if (window.top && window.top !== window) { + window.top.location.href = `${getConfig().COURSE_AUTHORING_MICROFRONTEND_URL}/taxonomies`; + } else { + navigate('/taxonomies'); + } + }} > { intl.formatMessage(messages.emptyDrawerContentLink) }