Skip to content

Commit 4170533

Browse files
committed
[Feature]: Move Docs and Discord links to Top navigation! #2744
1 parent 5eb44a7 commit 4170533

2 files changed

Lines changed: 13 additions & 25 deletions

File tree

frontend/src/layouts/AppLayout/hooks.ts

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,7 @@ import { useLocation, useMatch } from 'react-router-dom';
44

55
import { SideNavigationProps } from 'components';
66

7-
import { DISCORD_URL, DOCS_URL } from 'consts';
87
import { useAppSelector, usePermissionGuard } from 'hooks';
9-
import { goToUrl } from 'libs';
108
import { ROUTES } from 'routes';
119
import { useGetServerInfoQuery } from 'services/server';
1210
import { GlobalUserRole } from 'types';
@@ -74,29 +72,6 @@ export const useSideNavigation = () => {
7472

7573
{ type: 'divider' },
7674

77-
{
78-
type: 'section-group',
79-
title: t('navigation.resources'),
80-
items: [
81-
{
82-
type: 'link',
83-
text: t('common.docs'),
84-
external: true,
85-
href: DOCS_URL,
86-
// onClick: () => goToUrl(DOCS_URL, true),
87-
},
88-
{
89-
type: 'link',
90-
text: t('common.discord'),
91-
external: true,
92-
href: DISCORD_URL,
93-
onClick: () => goToUrl(DISCORD_URL, true),
94-
},
95-
],
96-
},
97-
98-
{ type: 'divider' },
99-
10075
{
10176
type: 'link',
10277
href: '#version',

frontend/src/layouts/AppLayout/index.tsx

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ import {
1717
TopNavigation,
1818
} from 'components';
1919

20+
import { DISCORD_URL, DOCS_URL } from 'consts';
2021
import { useAppDispatch, useAppSelector } from 'hooks';
2122
import { goToUrl } from 'libs';
2223
import { ROUTES } from 'routes';
@@ -159,6 +160,18 @@ const AppLayout: React.FC<{ children: React.ReactNode }> = ({ children }) => {
159160
iconSvg: <ThemeIcon />,
160161
onClick: onChangeSystemModeToggle,
161162
},
163+
{
164+
type: 'button',
165+
text: t('common.docs'),
166+
external: true,
167+
onClick: () => goToUrl(DOCS_URL, true),
168+
},
169+
{
170+
type: 'button',
171+
text: t('common.discord'),
172+
external: true,
173+
onClick: () => goToUrl(DISCORD_URL, true),
174+
},
162175
{
163176
'data-class': 'user-menu',
164177
type: 'menu-dropdown',

0 commit comments

Comments
 (0)