mirror of
https://github.com/utopia-os/utopia-ui.git
synced 2025-12-13 07:46:10 +00:00
fixed embedded mode
This commit is contained in:
parent
3cc9790f77
commit
ed8dea5b32
@ -26,14 +26,16 @@ export default function NavBar({ appName}: { appName: string }) {
|
||||
|
||||
const nameRef = useRef<any>(null);
|
||||
const [nameWidth, setNameWidth] = useState<number>(0);
|
||||
const location = useLocation();
|
||||
const [showNav, setShowNav] = useState<boolean>(false)
|
||||
|
||||
|
||||
|
||||
useEffect(() => {
|
||||
nameRef && setNameWidth(nameRef.current.scrollWidth)
|
||||
}, [nameRef, appName])
|
||||
showNav && nameRef && setNameWidth(nameRef.current.scrollWidth)
|
||||
}, [nameRef, appName, showNav])
|
||||
|
||||
const location = useLocation();
|
||||
|
||||
const [showNav, setShowNav] = useState<boolean>(false)
|
||||
|
||||
|
||||
useEffect(() => {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user