diff --git a/apps/forum/src/components/Board.tsx b/apps/forum/src/components/Board.tsx index 10ca68a71..452c91297 100644 --- a/apps/forum/src/components/Board.tsx +++ b/apps/forum/src/components/Board.tsx @@ -28,6 +28,8 @@ const Board = ({ triggerRefresh, setBoard }: any) => { boards.find((board) => board.slug === boardSlug)?.slug || "" ); + localStorage.setItem("mobileNavCheck", "false"); + // Use Effect to set the board state in the parent component for tag filtering useEffect(() => { setBoard(boardSlug); diff --git a/apps/root/src/components/frame/MobileNav.tsx b/apps/root/src/components/frame/MobileNav.tsx index c4b714112..54e9df1ce 100644 --- a/apps/root/src/components/frame/MobileNav.tsx +++ b/apps/root/src/components/frame/MobileNav.tsx @@ -1,4 +1,4 @@ -import React, { useState } from "react" +import React, { useState, useEffect } from "react" import { getUserAttr, signOut } from "wasedatime-ui" import { useTranslation } from "react-i18next" @@ -19,6 +19,15 @@ const MobileNav = ({ navItems, openSignInModal }: Props) => { const [currentPath, setCurrentPath] = useState(window.location.pathname) const notSignedIn = !userAttr if (notSignedIn) getUserAttr().then((attr) => setUserAttr(attr)) + const [showTooltip, setShowTooltip] = useState(true) + + useEffect(() => { + const timeoutId = setTimeout(() => { + setShowTooltip(false) // Hide tooltip after 3 seconds + }, 3000) + + return () => clearTimeout(timeoutId) // Cleanup on unmount + }, []) // Run once after the initial render const styledLinks = navItems.map((item) => ( {
{item.name}
- {item.tooltip && ( + {item.tooltip && showTooltip && ( {item.tooltip}