import React from "react"; import Popper from "popper.js"; import { useRouter } from 'next/router' import Link from 'next/link'; import { faLanguage } from '@fortawesome/free-solid-svg-icons' import { FontAwesomeIcon } from '@fortawesome/react-fontawesome' const Dropdown = ({ color }) => { const router = useRouter() const { locale, locales, defaultLocale, pathname } = router // dropdown props const [dropdownPopoverShow, setDropdownPopoverShow] = React.useState(false); const btnDropdownRef = React.createRef(); const popoverDropdownRef = React.createRef(); const openDropdownPopover = () => { new Popper(btnDropdownRef.current, popoverDropdownRef.current, { placement: "bottom-start" }); setDropdownPopoverShow(true); }; const closeDropdownPopover = () => { setDropdownPopoverShow(false); }; // bg colors let bgColor; color === "white" ? (bgColor = "bg-gray-800") : (bgColor = "bg-" + color + "-500"); return ( <>
> ); }; export default function LangSelector() { return ( <>