Your Dashboards
- {userDashboards.map(({ name, route }) => (
-
- ))}
+
+ {userDashboards.map((dashboard) => (
+
+ ))}
+
- ) : null}
+ )}
- {footerLinks.map(({ category, pages }) => (
-
-
{category}
-
- {pages.map(({ name, route }) => (
-
- ))}
+ {/* Resources - Footer Section */}
+
+
Resources
+
+
+
- ))}
+
+
+ {/* Legal Footer */}
+
+
+ Privacy
+
+ •
+
+ Terms
+
+
-
+
}>
@@ -118,34 +167,3 @@ export const Menu = React.memo(function Menu({
)
})
-
-const LinkToPage = React.memo(function LinkToPage({
- route,
- name,
- attention,
- asPath
-}: {
- route: string
- name: string
- attention?: boolean
- asPath: string
-}) {
- const isActive = route === asPath.split('/?')[0].split('?')[0]
- return (
-
-
- {name}
- {attention ? (
-
- ) : null}
-
-
- )
-})
diff --git a/src/components/Nav/Mobile/index.tsx b/src/components/Nav/Mobile/index.tsx
index 367dc113b..5fc50d619 100644
--- a/src/components/Nav/Mobile/index.tsx
+++ b/src/components/Nav/Mobile/index.tsx
@@ -1,22 +1,20 @@
import * as React from 'react'
import { lazy } from 'react'
import { BasicLink } from '~/components/Link'
-import { TNavLink, TNavLinks } from '../types'
+import type { NavLink } from '../navStructure'
import { Menu } from './Menu'
import { Settings } from './Settings'
const MobileSearch = lazy(() => import('~/components/Search').then((m) => ({ default: m.MobileSearch }))) as React.FC
export const MobileNav = ({
- mainLinks,
pinnedPages,
userDashboards,
- footerLinks
+ accountAttention
}: {
- mainLinks: TNavLinks
- pinnedPages: TNavLink[]
- userDashboards: TNavLink[]
- footerLinks: TNavLinks
+ pinnedPages: string[]
+ userDashboards: NavLink[]
+ accountAttention?: boolean
}) => {
return (
)
}
diff --git a/src/components/Nav/NavCollapseContext.tsx b/src/components/Nav/NavCollapseContext.tsx
new file mode 100644
index 000000000..e6ad40ada
--- /dev/null
+++ b/src/components/Nav/NavCollapseContext.tsx
@@ -0,0 +1,38 @@
+import * as React from 'react'
+
+interface NavCollapseContextType {
+ collapseAll: () => void
+ registerDisclosure: (id: string, disclosure: any) => void
+ unregisterDisclosure: (id: string) => void
+}
+
+const NavCollapseContext = React.createContext
(null)
+
+export function NavCollapseProvider({ children }: { children: React.ReactNode }) {
+ const disclosuresRef = React.useRef