Skip to content

Commit 9a91f66

Browse files
authored
feat(ws): Notebooks 2.0 // Frontend // Rename settings to debug (#184)
Signed-off-by: paulovmr <832830+paulovmr@users.noreply.github.com>
1 parent d84621a commit 9a91f66

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

workspaces/frontend/src/app/AppRoutes.tsx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import * as React from 'react';
22
import { Route, Routes } from 'react-router-dom';
33
import { NotFound } from './pages/notFound/NotFound';
4-
import { Settings } from './pages/Settings/Settings';
4+
import { Debug } from './pages/Debug/Debug';
55
import { Workspaces } from './pages/Workspaces/Workspaces';
66

77
export const isNavDataGroup = (navItem: NavDataItem): navItem is NavDataGroup =>
@@ -21,7 +21,7 @@ export type NavDataGroup = NavDataCommon & {
2121

2222
type NavDataItem = NavDataHref | NavDataGroup;
2323

24-
export const useAdminSettings = (): NavDataItem[] => {
24+
export const useAdminDebugSettings = (): NavDataItem[] => {
2525
// get auth access for example set admin as true
2626
const isAdmin = true; //this should be a call to getting auth / role access
2727

@@ -33,8 +33,8 @@ export const useAdminSettings = (): NavDataItem[] => {
3333

3434
return [
3535
{
36-
label: 'Settings',
37-
children: [{ label: 'Notebooks', path: '/notebookSettings' }],
36+
label: 'Debug',
37+
children: [{ label: 'Notebooks', path: '/notebookDebugSettings' }],
3838
},
3939
];
4040
};
@@ -44,7 +44,7 @@ export const useNavData = (): NavDataItem[] => [
4444
label: 'Notebooks',
4545
path: '/',
4646
},
47-
...useAdminSettings(),
47+
...useAdminDebugSettings(),
4848
];
4949

5050
const AppRoutes: React.FC = () => {
@@ -57,7 +57,7 @@ const AppRoutes: React.FC = () => {
5757
{
5858
// TODO: Remove the linter skip when we implement authentication
5959
// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
60-
isAdmin && <Route path="/notebookSettings/*" element={<Settings />} />
60+
isAdmin && <Route path="/notebookDebugSettings/*" element={<Debug />} />
6161
}
6262
</Routes>
6363
);

workspaces/frontend/src/app/pages/Settings/Settings.tsx renamed to workspaces/frontend/src/app/pages/Debug/Debug.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,11 @@ import {
99
PageSection,
1010
} from '@patternfly/react-core';
1111

12-
const Settings: React.FunctionComponent = () => (
12+
const Debug: React.FunctionComponent = () => (
1313
<PageSection>
1414
<EmptyState
1515
variant={EmptyStateVariant.full}
16-
titleText="Empty State (Stub Settings Module)"
16+
titleText="Debug page (for development only)"
1717
icon={CubesIcon}
1818
>
1919
<EmptyStateBody>
@@ -27,4 +27,4 @@ const Settings: React.FunctionComponent = () => (
2727
</PageSection>
2828
);
2929

30-
export { Settings };
30+
export { Debug };

0 commit comments

Comments
 (0)