diff --git a/docs/site/app/(no-sidebar)/page.tsx b/docs/site/app/(no-sidebar)/page.tsx index 6788a0e23d290..66efddcc7da1e 100644 --- a/docs/site/app/(no-sidebar)/page.tsx +++ b/docs/site/app/(no-sidebar)/page.tsx @@ -1,7 +1,7 @@ "use client"; import React, { useState } from "react"; -import cn from "classnames"; +import { cn } from "@/components/cn"; import Link from "next/link"; import { motion } from "framer-motion"; import { Clients } from "@/app/_clients/clients"; diff --git a/docs/site/app/(no-sidebar)/showcase/page.tsx b/docs/site/app/(no-sidebar)/showcase/page.tsx index e084aa0e9d891..fafe4ab157c1d 100644 --- a/docs/site/app/(no-sidebar)/showcase/page.tsx +++ b/docs/site/app/(no-sidebar)/showcase/page.tsx @@ -16,16 +16,16 @@ function Showcase(): JSX.Element {
-

+

Showcase

-

+

Who is using Turborepo?

-
+
diff --git a/docs/site/app/_clients/client-logo.tsx b/docs/site/app/_clients/client-logo.tsx index 97de40f4a48b9..3a966a95254f6 100644 --- a/docs/site/app/_clients/client-logo.tsx +++ b/docs/site/app/_clients/client-logo.tsx @@ -1,5 +1,5 @@ import React from "react"; -import cn from "classnames"; +import { cn } from "@/components/cn"; import Image from "next/image"; import type { TurboUser } from "./users"; @@ -12,10 +12,12 @@ export function Logo({ user, theme, isLink, + className, }: { user: TurboUser; theme: "dark" | "light"; isLink: boolean; + className?: string; }): JSX.Element { const styles = { ...DEFAULT_SIZE, @@ -32,10 +34,7 @@ export function Logo({ const logo = ( {`${user.caption}'s { + setMounted(true); + }, []); + + // avoid hydration errors + if (!mounted) return null; - users + return users .filter((i) => (companyList ? companyList.includes(i.caption) : true)) - .forEach((user) => { - if (user.pinned) { - showcaseDark.push( - - - - ); - showcaseLight.push( - - - - ); - } - }); + .map((user) => { + const isDark = theme === "dark"; + const imgTheme = isDark ? "light" : "dark"; - return ( - <> - {showcaseDark} - {showcaseLight} - - ); + return ( + + + + ); + }); } diff --git a/docs/site/app/_components/footer.tsx b/docs/site/app/_components/footer.tsx index 080c555418b0d..e6d02553bb8ad 100644 --- a/docs/site/app/_components/footer.tsx +++ b/docs/site/app/_components/footer.tsx @@ -4,7 +4,7 @@ import { useRouter } from "next/navigation"; import Link from "next/link"; import type { ReactNode, ReactElement } from "react"; import { useState } from "react"; -import cn from "classnames"; +import { cn } from "@/components/cn"; import { VercelLogo } from "./logos"; import { gitHubRepoUrl } from "@/lib/constants"; diff --git a/docs/site/app/_components/logo-context.tsx b/docs/site/app/_components/logo-context.tsx index aa6aed91a7136..93afde0899edd 100644 --- a/docs/site/app/_components/logo-context.tsx +++ b/docs/site/app/_components/logo-context.tsx @@ -3,7 +3,7 @@ import type { MouseEvent } from "react"; import { useEffect, useCallback, useState, useRef } from "react"; import Link from "next/link"; -import classNames from "classnames"; +import { cn } from "@/components/cn"; import { VercelLogo } from "./logos"; import { PRODUCT_MENU_ITEMS, PLATFORM_MENU_ITEMS } from "./items"; import type { MenuItemProps } from "./types"; @@ -17,9 +17,7 @@ function MenuDivider({ }): JSX.Element { return (

{children} @@ -63,7 +61,7 @@ function MenuItem({ } }, [copied, closeMenu]); - const classes = classNames( + const classes = cn( className, "group flex items-center px-4 py-2 text-sm dark:hover:bg-gray-800 hover:bg-gray-200 w-full rounded-md" ); @@ -170,7 +168,7 @@ export function LogoContext(): JSX.Element { ))} Products - {PRODUCT_MENU_ITEMS({ theme }).map((item) => ( + {PRODUCT_MENU_ITEMS().map((item) => ( { setOpen(false); diff --git a/docs/site/app/_components/logos.tsx b/docs/site/app/_components/logos.tsx index 10ccca13ca480..615b048be1899 100644 --- a/docs/site/app/_components/logos.tsx +++ b/docs/site/app/_components/logos.tsx @@ -1,9 +1,9 @@ -import classNames from "classnames"; +import { cn } from "@/components/cn"; export function VercelLogo({ className }: { className?: string }): JSX.Element { return ( & { diff --git a/docs/site/components/files.tsx b/docs/site/components/files.tsx index 30da4b2581a81..a4dd05a7d9d5c 100644 --- a/docs/site/components/files.tsx +++ b/docs/site/components/files.tsx @@ -1,4 +1,4 @@ -import classNames from "classnames"; +import { cn } from "@/components/cn"; import { File as FumaFile, Folder as FumaFolder, @@ -18,9 +18,10 @@ export function File({ }): JSX.Element { return ( @@ -39,9 +40,10 @@ export function Folder({ }): JSX.Element { return ( diff --git a/docs/site/components/image/themed-image-figure.tsx b/docs/site/components/image/themed-image-figure.tsx index c44761973e7da..2c8ed22c021dd 100644 --- a/docs/site/components/image/themed-image-figure.tsx +++ b/docs/site/components/image/themed-image-figure.tsx @@ -1,5 +1,5 @@ import React from "react"; -import cn from "classnames"; +import { cn } from "@/components/cn"; import type { ImageFigureProps } from "./image-figure"; import type { ThemedImageProps } from "./themed-image"; import { ThemedImage } from "./themed-image"; @@ -27,10 +27,8 @@ export function ThemedImageFigure(
{} diff --git a/docs/site/components/theme-aware-image.tsx b/docs/site/components/theme-aware-image.tsx index 0ec9c0fae4e74..173ab1f0c73a3 100644 --- a/docs/site/components/theme-aware-image.tsx +++ b/docs/site/components/theme-aware-image.tsx @@ -1,5 +1,5 @@ import React from "react"; -import cn from "classnames"; +import { cn } from "@/components/cn"; import type { ImageProps } from "next/image"; import Image from "next/image"; diff --git a/docs/site/package.json b/docs/site/package.json index abfe2743ae890..7be37fd9dc748 100644 --- a/docs/site/package.json +++ b/docs/site/package.json @@ -34,7 +34,6 @@ "@vercel/speed-insights": "1.2.0", "algoliasearch": "^4.23.3", "class-variance-authority": "^0.7.1", - "classnames": "^2.5.1", "clsx": "^2.1.1", "copy-to-clipboard": "^3.3.3", "fast-glob": "^3.3.2", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index f213f55239df5..4b0f9c46cff3c 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -139,9 +139,6 @@ importers: class-variance-authority: specifier: ^0.7.1 version: 0.7.1 - classnames: - specifier: ^2.5.1 - version: 2.5.1 clsx: specifier: ^2.1.1 version: 2.1.1 @@ -7140,10 +7137,6 @@ packages: clsx: 2.1.1 dev: false - /classnames@2.5.1: - resolution: {integrity: sha512-saHYOzhIQs6wy2sVxTM6bUDsQO4F50V9RQ22qBpEdCW+I+/Wmke2HOl6lS6dTpdxVhb88/I6+Hs+438c3lfUow==} - dev: false - /clean-css@5.3.3: resolution: {integrity: sha512-D5J+kHaVb/wKSFcyyV75uCn8fiY4sV38XJoe4CUyGQ+mOU/fMVYUdH1hJC+CJQ5uY3EnW27SbJYS4X8BiLrAFg==} engines: {node: '>= 10.0'}