diff --git a/packages/ui/src/components/Molecules/LanguageSwitcher.tsx b/packages/ui/src/components/Molecules/LanguageSwitcher.tsx index d93f2b630..9a7e8c29a 100644 --- a/packages/ui/src/components/Molecules/LanguageSwitcher.tsx +++ b/packages/ui/src/components/Molecules/LanguageSwitcher.tsx @@ -1,5 +1,11 @@ import { Link, Locale, useLocation } from '@custom/schema'; -import { Menu, MenuButton, MenuItems, Transition } from '@headlessui/react'; +import { + Menu, + MenuButton, + MenuItem, + MenuItems, + Transition, +} from '@headlessui/react'; import { ChevronDownIcon } from '@heroicons/react/20/solid'; import clsx from 'clsx'; import React, { Fragment } from 'react'; @@ -32,6 +38,7 @@ export function LanguageSwitcher() { 'inline-flex justify-center w-full rounded-md bg-white text-sm', { 'hover:text-blue-600': isMultiLingual, + 'cursor-not-allowed opacity-70': !isMultiLingual, }, )} disabled={!isMultiLingual} @@ -57,7 +64,7 @@ export function LanguageSwitcher() { {translations[locale] && location.pathname !== translations[locale] ? ( - + {({ focus }) => translations[locale] ? ( ) } - + ) : null} ))}