Skip to content

Commit

Permalink
fix: correct redirect to taxonomies page
Browse files Browse the repository at this point in the history
  • Loading branch information
Dima Alipov committed Dec 6, 2024
1 parent a0f6f43 commit 2e18c94
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/content-tags-drawer/ContentTagsDrawer.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { getConfig } from '@edx/frontend-platform';
import React, { useContext, useEffect } from 'react';
import {
Container,
Expand Down Expand Up @@ -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`;

Check warning on line 66 in src/content-tags-drawer/ContentTagsDrawer.tsx

View check run for this annotation

Codecov / codecov/patch

src/content-tags-drawer/ContentTagsDrawer.tsx#L66

Added line #L66 was not covered by tests
} else {
navigate('/taxonomies');
}
}}
>
{ intl.formatMessage(messages.emptyDrawerContentLink) }
</Button>
Expand Down

0 comments on commit 2e18c94

Please sign in to comment.