forked from matter-labs/zksync-docs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathheader-links.ts
31 lines (29 loc) · 896 Bytes
/
header-links.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
export const headerLinks = () => {
const config = useRuntimeConfig();
const route = useRoute();
const activeApp = config.public.app;
const isDocsApp = activeApp === 'docs';
const isCodeApp = activeApp === 'code';
return [
{
label: 'ZKsync Era',
to: isDocsApp ? '/zksync-era' : `${config.public.urls.docs}/zksync-era`,
active: route.path.startsWith('/zksync-era'),
},
{
label: 'ZK Stack',
to: isDocsApp ? '/zk-stack' : `${config.public.urls.docs}/zk-stack`,
active: route.path.startsWith('/zk-stack'),
},
{
label: 'ZKsync Protocol',
to: isDocsApp ? '/zksync-protocol' : `${config.public.urls.docs}/zksync-protocol`,
active: route.path.startsWith('/zksync-protocol'),
},
{
label: 'Community Code',
to: isCodeApp ? '/' : `${config.public.urls.code}`,
active: isCodeApp,
},
];
};