-
Notifications
You must be signed in to change notification settings - Fork 81
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: display all child tags in the "bare bones" taxonomy detail page (…
…#703) Also includes: - feat: set <title> on taxonomy list page and taxonomy detail page - fix: display all taxonomies on the list page, even if > 10 - refactor: separate out loading spinner component
- Loading branch information
1 parent
f9b008e
commit 352ef35
Showing
9 changed files
with
214 additions
and
60 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,16 @@ | ||
import { isEmpty } from 'lodash'; | ||
|
||
const getPageHeadTitle = (courseName, pageName) => { | ||
if (isEmpty(courseName)) { | ||
/** | ||
* Generate the string for the page <title> | ||
* @param {string} courseOrSectionName The name of the course, or the section of the MFE that the user is in currently | ||
* @param {string} pageName The name of the current page | ||
* @returns {string} The combined title | ||
*/ | ||
const getPageHeadTitle = (courseOrSectionName, pageName) => { | ||
if (isEmpty(courseOrSectionName)) { | ||
return `${pageName} | ${process.env.SITE_NAME}`; | ||
} | ||
return `${pageName} | ${courseName} | ${process.env.SITE_NAME}`; | ||
return `${pageName} | ${courseOrSectionName} | ${process.env.SITE_NAME}`; | ||
}; | ||
|
||
export default getPageHeadTitle; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.