Skip to content
This repository has been archived by the owner on Dec 27, 2024. It is now read-only.

Commit

Permalink
refactor: announcements route takes user to expected page (#58)
Browse files Browse the repository at this point in the history
* fix: route to default announcements page

This helps with backward compatability as it will take users
to the old announcements page they are expecting to see at the
/announcements route.

docs(readme): update yarn install command (#57)

* chore: ignore .tgz

Signed-off-by: Kurt King <[email protected]>

* docs: update install cmd

Signed-off-by: Kurt King <[email protected]>

---------

Signed-off-by: Kurt King <[email protected]>

* chore: add changeset

Signed-off-by: Kurt King <[email protected]>

---------

Signed-off-by: Kurt King <[email protected]>
  • Loading branch information
kurtaking authored Oct 21, 2023
1 parent 4d750f0 commit f932cbd
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
5 changes: 5 additions & 0 deletions .changeset/quick-news-swim.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@procore-oss/backstage-plugin-announcements': patch
---

restores original page /announcements take end user to
9 changes: 7 additions & 2 deletions plugins/announcements/src/components/Router.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ import { CreateAnnouncementContent } from './Announcements/CreateAnnouncementCon
import { EditAnnouncementContent } from './Announcements/EditAnnouncementContent';
import { CategoriesPage } from './Category/CategoriesPage';
import { AnnouncementsAdminPage } from './Announcements/AnnouncementsAdminPage';
import { AdminPageLayout } from './Admin';

type RouterProps = {
themeId?: string;
Expand All @@ -33,11 +34,15 @@ export const Router = (props: RouterProps) => {

return (
<Routes>
<Route path="/" element={<AnnouncementsPage {...propsWithDefaults} />} />
<Route
path="/admin"
path="/"
element={<AnnouncementsAdminPage {...propsWithDefaults} />}
/>
<Route
path="/newsfeed"
element={<AnnouncementsPage {...propsWithDefaults} />}
/>
<Route path="/admin" element={<AdminPageLayout />} />
<Route
path={`${announcementViewRouteRef.path}`}
element={<AnnouncementPage {...propsWithDefaults} />}
Expand Down

0 comments on commit f932cbd

Please sign in to comment.