Update SiteHeader.tsx
fix: change the display "Home" logic when url path === "/", t will not to affect the existing site
This commit is contained in:
parent
85931cec35
commit
b0d584042d
|
|
@ -133,9 +133,9 @@ export const SiteHeader: React.FC<{
|
|||
}
|
||||
}, [subscribeToSite.isError, subscribeToSite.data?.code])
|
||||
|
||||
const leftLinks: HeaderLinkType[] = [
|
||||
...(site?.navigation || [{ label: "Home", url: "/" }]),
|
||||
]
|
||||
const leftLinks: HeaderLinkType[] = site?.navigation?.find(nav => nav.url === "/") ?
|
||||
site.navigation : [{ label: "Home", url: "/" }, ...(site?.navigation || [])]
|
||||
|
||||
|
||||
const moreMenuItems = [
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in New Issue