diff --git a/workspaces/website/src/components/Layout/Navbar/LanguageSwitcherDropdown.tsx b/workspaces/website/src/components/Layout/Navbar/LanguageSwitcherDropdown.tsx
deleted file mode 100644
index b19ef4e6bd4..00000000000
--- a/workspaces/website/src/components/Layout/Navbar/LanguageSwitcherDropdown.tsx
+++ /dev/null
@@ -1,124 +0,0 @@
-import {
- Popover,
- PopoverContent,
- PopoverTrigger,
- Stack,
- Icon,
- HStack,
- VStack,
- Spacer,
- Box,
- StackDivider,
-} from "@chakra-ui/react";
-import { Button } from "@ui/Button";
-import { Heading } from "@ui/Typography/Heading";
-import { Text } from "@ui/Typography/Text";
-
-import * as React from "react";
-import { HiOutlineGlobeAlt } from "react-icons/hi2";
-
-import { PopoverIcon } from "./PopoverIcon";
-
-type Props = {
- title: string;
- description: string;
- subtitle: string;
- callToAction: string;
- children?: React.ReactNode;
- selectedLocale: string;
-};
-
-export const LanguageSwitcherDropdown = ({
- title = "Languages",
- description,
- subtitle,
- callToAction,
- children,
- selectedLocale,
-}: Props) => (
-
- {({ isOpen }) => (
-
-
- }
- variant="icon"
- rightIcon={}
- textTransform="uppercase"
- sx={{marginInlineStart: "0 !important"}}
- >
- {selectedLocale}
-
-
-
-
- }
- >
-
-
- {title}
-
- {children}
-
-
- {/* */}
-
-
-
-
-
- {subtitle}
-
-
- {description}
-
-
-
-
-
-
- )}
-
-);
diff --git a/workspaces/website/src/components/Layout/Navbar/MobileLanguagesDrawer.tsx b/workspaces/website/src/components/Layout/Navbar/MobileLanguagesDrawer.tsx
deleted file mode 100644
index ce8e4ad4e59..00000000000
--- a/workspaces/website/src/components/Layout/Navbar/MobileLanguagesDrawer.tsx
+++ /dev/null
@@ -1,56 +0,0 @@
-import { useRef } from "react";
-import {
- Drawer,
- DrawerBody,
- DrawerContent,
- DrawerHeader,
- DrawerOverlay,
- Box
-} from "@chakra-ui/react";
-import LocaleSwitcher from "./LocaleSwitcher";
-import { CSSProperties, ReactNode } from "react";
-import { NavLayout } from "./NavLayout";
-
-type Props = {
- children: ReactNode;
- isOpen: boolean;
- onClose: () => void;
- contentStyle?: CSSProperties;
- search?: React.ReactNode;
-};
-export default function MobileLanguagesDrawer({
- children,
- isOpen,
- onClose,
- contentStyle,
- search
-}: Props) {
- const menuButtonRef = useRef(null);
- return (
-
-
-
-
-
-
- {children}
-
-
-
- );
-}
diff --git a/workspaces/website/src/components/Layout/Navbar/Navbar.tsx b/workspaces/website/src/components/Layout/Navbar/Navbar.tsx
index 5e16b700717..0a2363a85e1 100644
--- a/workspaces/website/src/components/Layout/Navbar/Navbar.tsx
+++ b/workspaces/website/src/components/Layout/Navbar/Navbar.tsx
@@ -1,4 +1,3 @@
-import { useCallback, useState, useEffect } from "react";
import {
Box,
Drawer,
@@ -6,22 +5,16 @@ import {
DrawerContent,
DrawerHeader,
DrawerOverlay,
- Stack,
HStack,
useColorMode,
useColorModeValue,
useDisclosure,
Icon,
} from "@chakra-ui/react";
-import { Heading } from "@ui/Typography/Heading";
-import { Text } from "@ui/Typography/Text";
-import { ColumnLink, ColumnLinkDescription } from "@ui/ColumnLink/ColumnLink";
-import { i18nConfig } from "@starknet-io/cms-data/src/i18n/config";
import * as React from "react";
-import { HiGlobeAlt, HiOutlineMoon, HiOutlineSun } from "react-icons/hi2";
+import { HiOutlineMoon, HiOutlineSun } from "react-icons/hi2";
import { Button } from "../../Button";
import { NavLayout } from "./NavLayout";
-import MobileLanguagesDrawer from "./MobileLanguagesDrawer";
import { usePageContext } from "src/renderer/PageContextProvider";
import { SEOTexts } from "@starknet-io/cms-data/src/seo";
@@ -49,15 +42,7 @@ export const NavBar = ({
const { isOpen, onOpen, onClose } = useDisclosure();
const menuButtonRef = React.useRef(null);
const { colorMode, toggleColorMode } = useColorMode();
- const [isLanguagesDrawerOpen, setLanguagesDrawerOpen] = useState(false);
- const onLanguagesDrawerClose = useCallback(() => {
- setLanguagesDrawerOpen(false);
- onOpen();
- }, []);
- const onLanguagesDrawerOpen = useCallback(() => setLanguagesDrawerOpen(true), []);
- const { locale, urlPathname: pathname } = usePageContext();
- const localeConfig = i18nConfig.find((c) => c.code === locale)!;
- const topLanguages = ["en", "es", "fr", "de", "pt", "ar", "ja", "ko"];
+ const { urlPathname: pathname } = usePageContext();
React.useEffect(() => {
onClose();
@@ -73,14 +58,6 @@ export const NavBar = ({
}
}
- const openLanguageDrawer = () => {
- onLanguagesDrawerOpen();
- }
-
- useEffect(() => {
- isLanguagesDrawerOpen && onClose();
- }, [isLanguagesDrawerOpen])
-
return (
{colorMode === "light" ? "Dark" : "Light"} mode
- }
- onClick={openLanguageDrawer}
- >
- Languages
-
-
- Languages
- {i18nConfig
- .filter((c) => topLanguages.includes(c.code))
- .map((c, i) => {
- return (
-
-
- {c.name}
-
-
- {c.localName}
-
-
- );
- })}
-
-
- {seo.subtitle}
-
-
- {seo.description}
-
-
-
-
);
diff --git a/workspaces/website/src/pages/(components)/LocaleSwitcher.tsx b/workspaces/website/src/pages/(components)/LocaleSwitcher.tsx
deleted file mode 100644
index a9fd4afe3fd..00000000000
--- a/workspaces/website/src/pages/(components)/LocaleSwitcher.tsx
+++ /dev/null
@@ -1,47 +0,0 @@
-import { i18nConfig } from "@starknet-io/cms-data/src/i18n/config";
-import { LanguageSwitcherDropdown } from "@ui/Layout/Navbar/LanguageSwitcherDropdown";
-import { ColumnLink, ColumnLinkDescription } from "@ui/ColumnLink/ColumnLink";
-import { HStack } from "@chakra-ui/react";
-import { SEOTexts } from "@starknet-io/cms-data/src/seo";
-import { usePageContext } from "src/renderer/PageContextProvider";
-
-export default function LocaleSwitcher({ seo }: { seo: SEOTexts["language"] }) {
- const { locale, urlPathname: pathname } = usePageContext();
- const localeConfig = i18nConfig.find((c) => c.code === locale)!;
- const topLanguages = ["en", "es", "fr", "de", "pt", "ar", "ja", "ko"];
-
- return (
-
- {i18nConfig
- .filter((c) => topLanguages.includes(c.code))
- .map((c, i) => {
- return (
-
-
- {c.name}
-
-
- {c.localName}
-
-
- );
- })}
-
- );
-}
-
-//
-// {localeConfig.code === c.code && ""} {c.name} ({c.localName})
-// ;