Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add versions page and nav version #6814

Merged
merged 6 commits into from
Apr 30, 2024
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion src/components/Layout/TopNav/TopNav.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ import {Logo} from '../../Logo';
import {Feedback} from '../Feedback';
import {SidebarRouteTree} from '../Sidebar';
import type {RouteItem} from '../getRouteMeta';
import {siteConfig} from 'siteConfig';

declare global {
interface Window {
Expand Down Expand Up @@ -247,7 +248,7 @@ export default function TopNav({
)}>
{isMenuOpen ? <IconClose /> : <IconHamburger />}
</button>
<div className="flex 3xl:flex-1 align-center">
<div className="f">
<NextLink
href="/"
className={`active:scale-95 overflow-hidden transition-transform relative items-center text-primary dark:text-primary-dark p-1 whitespace-nowrap outline-link rounded-full 3xl:rounded-xl inline-flex text-lg font-normal gap-2`}>
Expand All @@ -259,6 +260,13 @@ export default function TopNav({
<span className="sr-only 3xl:not-sr-only">React</span>
</NextLink>
</div>
<div className="flex flex-column justify-center items-center">
<NextLink
href="/versions"
className=" flex py-2 flex-column justify-center items-center text-gray-50 dark:text-gray-30 hover:text-link hover:dark:text-link-dark hover:underline text-sm ms-1 cursor-pointer">
{siteConfig.version}
</NextLink>
</div>
</div>
<div className="items-center justify-center flex-1 hidden w-full md:flex 3xl:w-auto 3xl:shrink-0 3xl:justify-center">
<button
Expand Down
2 changes: 2 additions & 0 deletions src/content/community/versioning-policy.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ All stable builds of React go through a high level of testing and follow semanti

</Intro>

For a list of previous releases, see the [Versions](/versions) page.

## Stable releases {/*stable-releases*/}

Stable React releases (also known as "Latest" release channel) follow [semantic versioning (semver)](https://semver.org/) principles.
Expand Down
Loading
Loading