Skip to content

Commit

Permalink
remove useless usage of customFields.defaultVersionShown
Browse files Browse the repository at this point in the history
  • Loading branch information
slorber authored and Simek committed Oct 20, 2020
1 parent 399918d commit 54071c6
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions website/src/theme/DocItem/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,7 @@ import DocsRating from '../../../core/DocsRating';

function DocItem(props) {
const {siteConfig = {}} = useDocusaurusContext();
const {
url: siteUrl,
title: siteTitle,
titleDelimiter,
customFields,
} = siteConfig;
const {url: siteUrl, title: siteTitle, titleDelimiter} = siteConfig;
const {content: DocContent} = props;
const {metadata} = DocContent;
const {
Expand All @@ -52,8 +47,7 @@ function DocItem(props) {
});
const versions = useVersions(pluginId);
const version = useActiveVersion(pluginId);
const showVersionBadge =
versions.length > 1 && version.name !== customFields.defaultVersionShown;
const showVersionBadge = versions.length > 1 && !version.isLast;
const metaTitle = title
? `${title} ${titleDelimiter} ${siteTitle}`
: siteTitle;
Expand Down

0 comments on commit 54071c6

Please sign in to comment.