From 75bef0a9cb5a8fd6dad01e1b5b47c335bb7414ef Mon Sep 17 00:00:00 2001 From: Maximilian Franzke <787658+mfranzke@users.noreply.github.com> Date: Sun, 10 Nov 2024 11:26:02 +0100 Subject: [PATCH] fix(version switcher): displaying `latest` entry (#3438) * fix: latest branch * chore: not proud of that * Update version-switcher.tsx --- .../components/version-switcher/version-switcher.tsx | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/showcases/patternhub/components/version-switcher/version-switcher.tsx b/showcases/patternhub/components/version-switcher/version-switcher.tsx index ad8db938068..2290e317730 100644 --- a/showcases/patternhub/components/version-switcher/version-switcher.tsx +++ b/showcases/patternhub/components/version-switcher/version-switcher.tsx @@ -88,6 +88,10 @@ const VersionSwitcher = () => { (branch) => branch !== 'gh-pages' && !branch.includes('dependabot') ); + + // `latest` isn't a branch, but only existing within gh-pages + tags.unshift('latest'); + setCurrentBranch(branches); setCurrentBranch(tags); setGroupByTagsBranches(tags, branches);