app,create-app: remove / prefixes in sidebar items
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
This commit is contained in:
@@ -0,0 +1,12 @@
|
||||
---
|
||||
'@backstage/create-app': patch
|
||||
---
|
||||
|
||||
Removed the `/` prefix in the catalog `SidebarItem` element, as it is no longer needed.
|
||||
|
||||
To apply this change to an existing app, remove the `/` prefix from the catalog and any other sidebar items in `packages/app/src/components/Root/Root.ts`:
|
||||
|
||||
```diff
|
||||
-<SidebarItem icon={HomeIcon} to="/catalog" text="Home" />
|
||||
+<SidebarItem icon={HomeIcon} to="catalog" text="Home" />
|
||||
```
|
||||
@@ -82,7 +82,7 @@ export const Root = ({ children }: PropsWithChildren<{}>) => (
|
||||
<SidebarSearch />
|
||||
<SidebarDivider />
|
||||
{/* Global nav, not org-specific */}
|
||||
<SidebarItem icon={HomeIcon} to="/catalog" text="Home" />
|
||||
<SidebarItem icon={HomeIcon} to="catalog" text="Home" />
|
||||
<SidebarItem icon={ExtensionIcon} to="api-docs" text="APIs" />
|
||||
<SidebarItem icon={LibraryBooks} to="docs" text="Docs" />
|
||||
<SidebarItem icon={LayersIcon} to="explore" text="Explore" />
|
||||
|
||||
@@ -77,7 +77,7 @@ export const Root = ({ children }: PropsWithChildren<{}>) => (
|
||||
<SidebarSearch />
|
||||
<SidebarDivider />
|
||||
{/* Global nav, not org-specific */}
|
||||
<SidebarItem icon={HomeIcon} to="/catalog" text="Home" />
|
||||
<SidebarItem icon={HomeIcon} to="catalog" text="Home" />
|
||||
<SidebarItem icon={ExtensionIcon} to="api-docs" text="APIs" />
|
||||
<SidebarItem icon={LibraryBooks} to="docs" text="Docs" />
|
||||
<SidebarItem icon={CreateComponentIcon} to="create" text="Create..." />
|
||||
|
||||
@@ -80,7 +80,7 @@ sidebar:
|
||||
export const Root = ({ children }: PropsWithChildren<{}>) => (
|
||||
<SidebarPage>
|
||||
<Sidebar>
|
||||
+ <SidebarItem icon={HomeIcon} to="/catalog" text="Home" />
|
||||
+ <SidebarItem icon={HomeIcon} to="catalog" text="Home" />
|
||||
...
|
||||
</Sidebar>
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user