From c1a6f2b9574db67b9cc8ce316f454b155fad057f Mon Sep 17 00:00:00 2001 From: karamvir Date: Thu, 3 Aug 2023 17:01:17 -0700 Subject: [PATCH] fix alerter and repo routing, alerter card link --- frontend/src/resources/alerter/index.tsx | 18 ++++++++++-------- frontend/src/router.tsx | 4 ++-- 2 files changed, 12 insertions(+), 10 deletions(-) diff --git a/frontend/src/resources/alerter/index.tsx b/frontend/src/resources/alerter/index.tsx index 3ea7a4cf9..936cdf536 100644 --- a/frontend/src/resources/alerter/index.tsx +++ b/frontend/src/resources/alerter/index.tsx @@ -3,7 +3,7 @@ import { useAddRecentlyViewed, useRead } from "@hooks"; import { ResourceCard } from "@layouts/card"; import { Resource } from "@layouts/resource"; import { AlarmClock } from "lucide-react"; -import { useParams } from "react-router-dom"; +import { Link, useParams } from "react-router-dom"; export const AlerterName = ({ id }: { id: string }) => { const alerters = useRead("ListAlerters", {}).data; @@ -40,12 +40,14 @@ export const AlerterCard = ({ id }: { id: string }) => { const alerter = alerters?.find((a) => a._id?.$oid === id); if (!alerter) return null; return ( - } - > -
-
+ + } + > +
+
+ ); }; diff --git a/frontend/src/router.tsx b/frontend/src/router.tsx index e1f32e3bb..519bf4a7b 100644 --- a/frontend/src/router.tsx +++ b/frontend/src/router.tsx @@ -59,14 +59,14 @@ const router = createBrowserRouter([ path: "alerters", children: [ { path: "", element: }, - { path: ":builderId", element: }, + { path: ":alerterId", element: }, ], }, { path: "repos", children: [ { path: "", element: }, - { path: ":builderId", element: }, + { path: ":repoId", element: }, ], }, ],