1
0
Fork 0
mirror of https://github.com/muerwre/vault-frontend.git synced 2025-04-24 20:36:40 +07:00

fix: avatar upload and logout

This commit is contained in:
Fedor Katurov 2023-03-17 18:13:04 +06:00
parent 315ba31014
commit bb163eae8f
4 changed files with 41 additions and 19 deletions

View file

@ -27,11 +27,14 @@ const MenuButton: FC<MenuButtonProps> = ({
activate = 'focus',
fixed,
}) => {
const focus = useFocusEvent(false, 150);
const hover = useFocusEvent(false, 150);
const focus = useFocusEvent(false, 300);
const hover = useFocusEvent(false, 300);
const [referenceElement, setReferenceElement] = useState<HTMLButtonElement | null>(null);
const [popperElement, setPopperElement] = useState<HTMLDivElement | null>(null);
const [referenceElement, setReferenceElement] =
useState<HTMLButtonElement | null>(null);
const [popperElement, setPopperElement] = useState<HTMLDivElement | null>(
null,
);
const [arrowElement, setArrowElement] = useState<HTMLDivElement | null>(null);
const popper = usePopper(referenceElement, popperElement, {
@ -83,7 +86,11 @@ const MenuButton: FC<MenuButtonProps> = ({
[styles.visible]: visible,
})}
>
<div style={popper.styles.arrow} ref={setArrowElement} className={styles.arrow} />
<div
style={popper.styles.arrow}
ref={setArrowElement}
className={styles.arrow}
/>
{children}
</div>
</>