mirror of
https://github.com/khoaliber/khoj.git
synced 2026-03-08 05:39:13 +00:00
Update the navmenu title if prop is updated and undefined
This commit is contained in:
@@ -46,6 +46,8 @@ export default function NavMenu(props: NavMenuProps) {
|
|||||||
setIsMobileWidth(window.innerWidth < 768);
|
setIsMobileWidth(window.innerWidth < 768);
|
||||||
if (props.title) {
|
if (props.title) {
|
||||||
setDisplayTitle(props.title);
|
setDisplayTitle(props.title);
|
||||||
|
} else if (!props.title) {
|
||||||
|
setDisplayTitle(undefined);
|
||||||
}
|
}
|
||||||
|
|
||||||
}, [props.title]);
|
}, [props.title]);
|
||||||
|
|||||||
Reference in New Issue
Block a user