From 9754056990c6003adb4d94df53e5a536181337a2 Mon Sep 17 00:00:00 2001 From: Jonas Carlsen Date: Wed, 20 Mar 2024 19:40:00 +0100 Subject: [PATCH] Reduce subject and topic usage on ResourcePage --- src/containers/ArticlePage/ArticlePage.tsx | 28 ++++++------------- .../ArticlePage/components/ArticleHero.tsx | 12 ++------ 2 files changed, 11 insertions(+), 29 deletions(-) diff --git a/src/containers/ArticlePage/ArticlePage.tsx b/src/containers/ArticlePage/ArticlePage.tsx index e1fe2d9653..d061ce0228 100644 --- a/src/containers/ArticlePage/ArticlePage.tsx +++ b/src/containers/ArticlePage/ArticlePage.tsx @@ -71,7 +71,6 @@ const ArticlePage = ({ const { user, authContextLoaded } = useContext(AuthContext); const { t, i18n } = useTranslation(); const { trackPageView } = useTracker(); - const subjectPageUrl = config.ndlaFrontendDomain; useEffect(() => { if (!loading && authContextLoaded) { @@ -135,32 +134,24 @@ const ArticlePage = ({ const contentType = resource ? getContentType(resource) : undefined; const resourceType = contentType && isHeroContentType(contentType) ? contentType : undefined; - const copyPageUrlLink = topic ? `${subjectPageUrl}${topic.path}/${resource.id.replace("urn:", "")}` : undefined; - const printUrl = `${subjectPageUrl}/article-iframe/${i18n.language}/article/${resource.article.id}`; + const printUrl = `${config.ndlaFrontendDomain}/article-iframe/${i18n.language}/article/${resource.article.id}`; const breadcrumbItems = toBreadcrumbItems(t("breadcrumb.toFrontpage"), [...topicPath, resource]); return (
- + {`${getDocumentTitle(t, resource, subject)}`} {scripts?.map((script) => (