Skip to content

Commit

Permalink
#139 fix ts build errors
Browse files Browse the repository at this point in the history
  • Loading branch information
William Lima committed Dec 13, 2023
1 parent 8517a06 commit 4640f42
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions components/home/NavTemplate.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ const languages = ['ar', 'en'];

const NavBar: React.FC<{ menu: any; logo: string }> = ({ menu, logo }) => {
const router = useRouter();
const navRef = useRef();
const navRef = useRef<null | HTMLDivElement>(null);
const [iseMenuScrollable, setIsMenuScrollable] = useState(false);

function handleLocale(e: MouseEvent<HTMLButtonElement>) {
Expand All @@ -19,7 +19,7 @@ const NavBar: React.FC<{ menu: any; logo: string }> = ({ menu, logo }) => {
}

function checkScrollableMenu() {
const navbar = navRef.current;
const navbar: HTMLDivElement = navRef.current;
if (navbar) setIsMenuScrollable(navbar.scrollWidth > navbar.offsetWidth);
}

Expand Down

0 comments on commit 4640f42

Please sign in to comment.