Don't show worldgen button on non-worldgen guides

This commit is contained in:
Misode
2022-12-08 01:57:27 +01:00
parent 21e3f09865
commit f13c2f36f9

View File

@@ -178,10 +178,10 @@ export function Guide({ id }: Props) {
{Octicon.arrow_left}
<span>{locale('guides.all')}</span>
</a>
<a class="btn btn-link" href="/worldgen/">
{frontMatter?.tags?.includes('worldgen') && <a class="btn btn-link" href="/worldgen/">
{Icons.worldgen}
<span>{locale('worldgen')}</span>
</a>
</a>}
<div class="navigation-divider" />
<Btn icon={shareActive ? 'check' : 'link'} label={locale('share')} onClick={onShare} active={shareActive} tooltip={locale(shareActive ? 'copied' : 'copy_share')} class="guide-share" />
{allowedVersions && <VersionSwitcher value={guideVersion} allowed={allowedVersions} onChange={changeVersion} />}