diff --git a/src/components/CountrySelect.jsx b/src/components/CountrySelect.jsx deleted file mode 100644 index b3e8867..0000000 --- a/src/components/CountrySelect.jsx +++ /dev/null @@ -1,45 +0,0 @@ -import { useState } from "react"; -import { v4 as uuidv4 } from "uuid"; -import { useWordpressCustomData } from "../hooks/WordpressFetchData.js"; -import { useUserContext } from "../hooks/useUserContext.jsx"; - -export default function CountrySelect() { - const availableCountries = useWordpressCustomData("/available-countries"); - const { country, changeCountry } = useUserContext(); - - const [isSubmenuOpen, setIsSubmenuOpen] = useState(false); - - if (!availableCountries || !country) return
Loading...
; - - function handleChangeCountry(key, value) { - changeCountry({ name: value, iso: key }); - handleShowHideSubmenu(); - } - function handleShowHideSubmenu() { - setIsSubmenuOpen(!isSubmenuOpen); - } - - const countryOptions = Object.keys(availableCountries).map((key, value) => ( -
  • handleChangeCountry(key, availableCountries[key])}> - - {availableCountries[key]} -
  • - )); - - if (!countryOptions) return; - - return ( -
    - - -
    - ); -} diff --git a/src/components/Menu.jsx b/src/components/Menu.jsx deleted file mode 100644 index b6a2d4c..0000000 --- a/src/components/Menu.jsx +++ /dev/null @@ -1,19 +0,0 @@ -import { NavLink } from "react-router-dom"; -import { useLocation } from "react-router-dom"; -import { useUserContext } from "../hooks/useUserContext"; -export default function Menu() { - let location = useLocation(); - const { language, changeLanguage } = useUserContext(); - - return ( - - ); -} diff --git a/src/components/ProfileSelect.jsx b/src/components/ProfileSelect.jsx deleted file mode 100644 index 4fff3d3..0000000 --- a/src/components/ProfileSelect.jsx +++ /dev/null @@ -1,35 +0,0 @@ -import React, { useState } from "react"; -import { v4 as uuidv4 } from "uuid"; -import { useUserContext } from "../hooks/useUserContext"; - -export default function CountrySelect({ options }) { - const [isSubmenuOpen, setIsSubmenuOpen] = useState(false); - const { profile, changeProfile } = useUserContext(); - - function handleShowHideSubmenu() { - setIsSubmenuOpen(!isSubmenuOpen); - } - - function handleChangeProfile() { - changeProfile("subcontractor_employee"); - } - - if (!profile) return
    Loading...
    ; - - const selectOptions = Object.keys(options).map((key) => ( -
  • handleChangeProfile()}> - {options[key]} -
  • - )); - - return ( -
    - - -
    - ); -}