Skip to content

Commit

Permalink
Update docs-navbar.tsx
Browse files Browse the repository at this point in the history
  • Loading branch information
dragosct committed Nov 29, 2023
1 parent 0a2148f commit 254e6cc
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion widgets/layout/docs-navbar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import {
} from "@material-tailwind/react";
import { Logo, Search } from "@widgets";
import { formatNumber } from "@utils";
import { useRouter } from "next/router";

interface DocsNavbar {
slug: string[];
Expand Down Expand Up @@ -41,6 +42,7 @@ function NavItem({
export function DocsNavbar({ slug, setMobileNav }: DocsNavbar) {
const [stars, setStars] = React.useState(0);
const [open, setOpen] = React.useState(false);
const router = useRouter();

React.useEffect(() => {
window.addEventListener("resize", () => {
Expand Down Expand Up @@ -183,7 +185,7 @@ export function DocsNavbar({ slug, setMobileNav }: DocsNavbar) {
Material <br /> Tailwind
</Typography>
<Chip
value={`v${process.env.NEXT_PUBLIC_MT_FRAMEWORK_VERSION}`}
value={`v${router.asPath.includes("docs/react") ? process.env.NEXT_PUBLIC_MT_FRAMEWORK_VERSION : process.env.NEXT_PUBLIC_MT_HTML_FRAMEWORK_VERSION}`}
variant="outlined"
className="ml-2 border-[1.5px] border-blue-gray-50 pb-1 pt-1.5 text-primary"
/>
Expand Down

1 comment on commit 254e6cc

@vercel
Copy link

@vercel vercel bot commented on 254e6cc Nov 29, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.