@@ -11,14 +11,8 @@ import { useIsInsideMobileNavigation } from '@/components/MobileNavigation'
1111import { useSectionStore } from '@/components/SectionProvider'
1212import { Tag } from '@/components/Tag'
1313import { remToPx } from '@/lib/remToPx'
14-
15- interface NavGroup {
16- title : string
17- links : Array < {
18- title : string
19- href : string
20- } >
21- }
14+ import { nav } from '@/navigation'
15+ import { NavGroup } from '@/types/nav'
2216
2317function useInitialValue < T > ( value : T , condition = true ) {
2418 let initialValue = useRef ( value ) . current
@@ -229,75 +223,14 @@ function NavigationGroup({
229223 )
230224}
231225
232- export const navigation : Array < NavGroup > = [
233- {
234- title : 'Getting started' ,
235- links : [
236- { title : 'Introduction' , href : '/' } ,
237- { title : 'Quickstart' , href : '/quickstart' } ,
238- ] ,
239- } ,
240- {
241- title : 'Core concepts' ,
242- links : [
243- { title : 'Effects' , href : '/effects' } ,
244- { title : 'Commands' , href : '/commands' } ,
245- { title : 'Events' , href : '/events' } ,
246- { title : 'Timers' , href : '/timers' } ,
247- { title : 'Channel Rewards' , href : '/channel-rewards' } ,
248- { title : 'Preset Effect Lists' , href : '/preset-effect-lists' } ,
249- { title : 'Hotkeys' , href : '/hotkeys' } ,
250- { title : 'Counters' , href : '/counters' } ,
251- { title : 'Variables' , href : '/variables' } ,
252- { title : 'Effect Queues' , href : '/effect-queues' } ,
253- { title : 'Setups' , href : '/setups' } ,
254- ] ,
255- } ,
256- {
257- title : 'Guides' ,
258- links : [
259- { title : 'Alert Queues' , href : '/guides/alert-queues' } ,
260- { title : 'Conditional Effects' , href : '/v5/guides/conditional-effects' } ,
261- ] ,
262- } ,
263- {
264- title : 'Troubleshooting' ,
265- links : [
266- { title : 'FAQ' , href : '/v5/faq' } ,
267- ] ,
268- } ,
269- {
270- title : 'Custom scripts' ,
271- links : [
272- { title : 'Quickstart' , href : '/v5/dev/scripts' } ,
273- ] ,
274- } ,
275- {
276- title : 'API reference' ,
277- links : [
278- { title : 'Contacts' , href : '/contacts' } ,
279- { title : 'Conversations' , href : '/conversations' } ,
280- { title : 'Messages' , href : '/messages' } ,
281- { title : 'Groups' , href : '/groups' } ,
282- { title : 'Attachments' , href : '/attachments' } ,
283- ] ,
284- } ,
285- {
286- title : 'Contributing' ,
287- links : [
288- { title : 'Dev Environment Setup' , href : '/v5/dev/environment-setup' } ,
289- ] ,
290- } ,
291- ]
292-
293226export function Navigation ( props : React . ComponentPropsWithoutRef < 'nav' > ) {
294227 return (
295228 < nav { ...props } >
296229 < ul role = "list" >
297230 < TopLevelNavItem href = "/" > API</ TopLevelNavItem >
298231 < TopLevelNavItem href = "#" > Documentation</ TopLevelNavItem >
299232 < TopLevelNavItem href = "#" > Support</ TopLevelNavItem >
300- { navigation . map ( ( group , groupIndex ) => (
233+ { nav . map ( ( group , groupIndex ) => (
301234 < NavigationGroup
302235 key = { group . title }
303236 group = { group }
0 commit comments