Skip to content

Commit ff2fe69

Browse files
committed
Make Developer Guide sidebar button an external link
1 parent 821ae59 commit ff2fe69

File tree

4 files changed

+1
-58
lines changed

4 files changed

+1
-58
lines changed

backstage/packages/app/src/App.tsx

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,10 @@ import {
2727
import { ReportIssue } from '@backstage/plugin-techdocs-module-addons-contrib';
2828
import { TechDocsAddons } from '@backstage/plugin-techdocs-react';
2929
import { UserSettingsPage } from '@backstage/plugin-user-settings';
30-
import React from 'react';
3130
import { Route } from 'react-router-dom';
3231
import { apis } from './apis';
3332
import { Root } from './components/Root';
3433
import { entityPage } from './components/catalog/EntityPage';
35-
import { DeveloperGuidePage } from './components/dev-guide/GuideDocsPage';
3634
import { HomePage } from './components/home/HomePage';
3735
import { PortalDocsPage } from './components/portal-docs/PortalDocsPage';
3836
import { searchPage } from './components/search/SearchPage';
@@ -63,7 +61,6 @@ const routes = (
6361
<HomePage />
6462
</Route>
6563
<Route path="/catalog" element={<CatalogIndexPage />} />
66-
<Route path="/guide" element={<DeveloperGuidePage />} />
6764
<Route path="/portal-docs" element={<PortalDocsPage />} />
6865
<Route
6966
path="/catalog/:namespace/:kind/:name"

backstage/packages/app/src/components/Root/Root.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ export const Root = ({ children }: PropsWithChildren<{}>) => (
6868
<SidebarItem icon={CategoryIcon} to="/catalog" text="Catalog" />
6969
<SidebarItem
7070
icon={LibraryBooksIcon}
71-
to="/guide"
71+
to="https://dev-guide.diamond.ac.uk"
7272
text="Developer Guide"
7373
/>
7474
{/* End global nav */}

backstage/packages/app/src/components/dev-guide/GuideDocsPage.tsx

Lines changed: 0 additions & 18 deletions
This file was deleted.

backstage/packages/app/src/components/home/HomePage.tsx

Lines changed: 0 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,6 @@ import {
1010
Typography,
1111
} from '@material-ui/core';
1212
import CategoryIcon from '@material-ui/icons/Category';
13-
import LibraryBooksIcon from '@material-ui/icons/LibraryBooks';
14-
import React from 'react';
1513
import { useNavigate } from 'react-router-dom';
1614

1715
const SoftwareCatalogCard = () => {
@@ -45,37 +43,6 @@ const SoftwareCatalogCard = () => {
4543
);
4644
};
4745

48-
const DeveloperGuideCard = () => {
49-
const navigate = useNavigate();
50-
const orgName =
51-
useApi(configApiRef).getOptionalString('organization.name') ?? 'Backstage';
52-
53-
return (
54-
<Card style={{ height: '100%' }}>
55-
<CardActionArea onClick={() => navigate('/guide')}>
56-
<CardContent>
57-
<Typography variant="h5">
58-
<LibraryBooksIcon /> Developer Guide
59-
</Typography>
60-
<Typography variant="body2">
61-
Extensive documentation on developing software at {orgName}.
62-
Including Tutorials, How-Tos, Explanations & References.
63-
</Typography>
64-
</CardContent>
65-
<CardActions>
66-
<Button
67-
size="medium"
68-
color="primary"
69-
onClick={() => navigate('/guide')}
70-
>
71-
Visit
72-
</Button>
73-
</CardActions>
74-
</CardActionArea>
75-
</Card>
76-
);
77-
};
78-
7946
export const HomePage = () => {
8047
const orgName =
8148
useApi(configApiRef).getOptionalString('organization.name') ?? 'Backstage';
@@ -92,9 +59,6 @@ export const HomePage = () => {
9259
<Grid item xs={12} md={6} lg={4}>
9360
<SoftwareCatalogCard />
9461
</Grid>
95-
<Grid item xs={12} md={6} lg={4}>
96-
<DeveloperGuideCard />
97-
</Grid>
9862
</Grid>
9963
</Content>
10064
</PageWithHeader>

0 commit comments

Comments
 (0)