diff --git a/packages/ui/components/landing/Header/NavBar/NavBar.tsx b/packages/ui/components/landing/Header/NavBar/NavBar.tsx
index 0801c778..4aa72b1e 100644
--- a/packages/ui/components/landing/Header/NavBar/NavBar.tsx
+++ b/packages/ui/components/landing/Header/NavBar/NavBar.tsx
@@ -1,6 +1,6 @@
import { useState } from "react";
import Link from "next/link";
-import { Grid, Dropdown, Menu, Space } from "antd";
+import { Grid, Space } from "antd";
import { DownOutlined, DashboardOutlined, LogoutOutlined } from "@ant-design/icons";
@@ -13,12 +13,10 @@ import { getUserInitials } from "../utils";
import styles from "./style.module.css";
import { Fragment } from 'react'
-import { Transition, Popover } from '@headlessui/react'
+import { Transition, Menu } from '@headlessui/react'
import { ChevronDownIcon } from '@heroicons/react/20/solid'
-function classNames(...classes: any) {
- return classes.filter(Boolean).join(' ')
-}
+
const { useBreakpoint } = Grid;
@@ -36,24 +34,6 @@ const Entry = ({ href, text }: EntryProps) => (
interface UserDropDownProps {
logout: () => void;
}
-// const EventosDropDown = () => (
-//
-// );
-
const UserDropDown = ({ logout }: UserDropDownProps) => (
@@ -94,107 +74,73 @@ function NavBar({ landing = true }: any) {
const [userDropdownVisible, setUserDropdownVisible] = useState(false);
const [eventosDropdownVisible, setEventosDropdownVisible] = useState(false);
+ const closeEventsDropdown = () => {
+ setEventosDropdownVisible(false);
+ }
+
const closeUserDropdown = () => {
setUserDropdownVisible(false);
};
+
if (screens.md) {
return (
{MENU_ENTRIES.map(({ key, text }) => (
))}
-
-
- {({ open }) => (
- <>
-
-
{
- setEventosDropdownVisible(!eventosDropdownVisible);
- closeUserDropdown();
- }}
- >
-
- Eventos
-
-
-
-
-
-
-
-
-
- >
+
+
{
+ setEventosDropdownVisible(!eventosDropdownVisible);
+ closeUserDropdown();
+ }}>
+ Eventos
+
+
+ {eventosDropdownVisible && (
+
)}
-
-
-
- {user ? (
-
- setUserDropdownVisible(!userDropdownVisible)}
- >
- {user.photo ? (
- /* eslint-disable @next/next/no-img-element */
-
- ) : (
-
- {getUserInitials(user)}
-
- )}
-
+ {
+ user ? (
+
- {
+ setUserDropdownVisible(!userDropdownVisible)
+ closeEventsDropdown()
+ }}
>
-
-
-
- ) : (
-
- )}
-
+ {user.photo ? (
+ /* eslint-disable @next/next/no-img-element */
+
+ ) : (
+
+ {getUserInitials(user)}
+
+ )}
+
+
+
+
+ ) : (
+
+ )
+ }
+
);
}