Skip to content

Commit

Permalink
fix: flash header
Browse files Browse the repository at this point in the history
  • Loading branch information
OXeu committed Jul 11, 2024
1 parent d5f4ef7 commit 67e8189
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions client/src/components/header.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { useContext, useState } from "react";
import { useContext, useMemo, useState } from "react";
import { useTranslation } from "react-i18next";
import ReactModal from "react-modal";
import Popup from "reactjs-popup";
Expand All @@ -16,7 +16,7 @@ export function Header({ children }: { children?: React.ReactNode }) {
const profile = useContext(ProfileContext);
const { t } = useTranslation()

return (
const UI = useMemo(() => (
<>
<div className="fixed z-40">
<div className="w-screen">
Expand Down Expand Up @@ -67,7 +67,8 @@ export function Header({ children }: { children?: React.ReactNode }) {
</div>
<div className="h-20"></div>
</>
)
), [profile])
return UI
}

function NavItem({ menu, title, selected, href, when = true, onClick }: {
Expand Down

0 comments on commit 67e8189

Please sign in to comment.