Skip to content

Commit

Permalink
feat: set <title> on taxonomy list page and taxonomy detail page
Browse files Browse the repository at this point in the history
  • Loading branch information
bradenmacdonald committed Nov 20, 2023
1 parent 4b7caaa commit 9f4d892
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/taxonomy/TaxonomyListPage.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,10 @@ import {
Spinner,
} from '@edx/paragon';
import { useIntl } from '@edx/frontend-platform/i18n';
import { Helmet } from 'react-helmet';

import SubHeader from '../generic/sub-header/SubHeader';
import getPageHeadTitle from '../generic/utils';
import messages from './messages';
import TaxonomyCard from './taxonomy-card';
import { useTaxonomyListDataResponse, useIsTaxonomyListDataLoaded } from './data/apiHooks';
Expand Down Expand Up @@ -35,6 +38,9 @@ const TaxonomyListPage = () => {

return (
<>
<Helmet>
<title>{getPageHeadTitle("", intl.formatMessage(messages.headerTitle))}</title>
</Helmet>
<div className="pt-4.5 pr-4.5 pl-4.5 pb-2 bg-light-100 box-shadow-down-2">
<Container size="xl">
<SubHeader
Expand Down
5 changes: 5 additions & 0 deletions src/taxonomy/taxonomy-detail/TaxonomyDetailPage.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,12 @@ import {
Container,
Layout,
} from '@edx/paragon';
import { Helmet } from 'react-helmet';
import { Link, useParams } from 'react-router-dom';

import ConnectionErrorAlert from '../../generic/ConnectionErrorAlert';
import Loading from '../../generic/Loading';
import getPageHeadTitle from '../../generic/utils';
import SubHeader from '../../generic/sub-header/SubHeader';
import taxonomyMessages from '../messages';
import TaxonomyDetailMenu from './TaxonomyDetailMenu';
Expand Down Expand Up @@ -77,6 +79,9 @@ const TaxonomyDetailPage = () => {

return (
<>
<Helmet>
<title>{getPageHeadTitle("", taxonomy.name)}</title>
</Helmet>
<div className="pt-4.5 pr-4.5 pl-4.5 pb-2 bg-light-100 box-shadow-down-2">
<Container size="xl">
<Breadcrumb
Expand Down

0 comments on commit 9f4d892

Please sign in to comment.