mirror of
https://github.com/moghtech/komodo.git
synced 2026-03-11 17:44:19 -05:00
fix alerter and repo routing, alerter card link
This commit is contained in:
@@ -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 (
|
||||
<ResourceCard
|
||||
title={alerter.name}
|
||||
description={alerter.description ?? "some desc"}
|
||||
statusIcon={<AlarmClock className="w-4 h-4" />}
|
||||
>
|
||||
<div></div>
|
||||
</ResourceCard>
|
||||
<Link to={`/alerters/${id}`}>
|
||||
<ResourceCard
|
||||
title={alerter.name}
|
||||
description={alerter.description ?? "some desc"}
|
||||
statusIcon={<AlarmClock className="w-4 h-4" />}
|
||||
>
|
||||
<div></div>
|
||||
</ResourceCard>
|
||||
</Link>
|
||||
);
|
||||
};
|
||||
|
||||
@@ -59,14 +59,14 @@ const router = createBrowserRouter([
|
||||
path: "alerters",
|
||||
children: [
|
||||
{ path: "", element: <Alerters /> },
|
||||
{ path: ":builderId", element: <AlerterPage /> },
|
||||
{ path: ":alerterId", element: <AlerterPage /> },
|
||||
],
|
||||
},
|
||||
{
|
||||
path: "repos",
|
||||
children: [
|
||||
{ path: "", element: <Repos /> },
|
||||
{ path: ":builderId", element: <RepoPage /> },
|
||||
{ path: ":repoId", element: <RepoPage /> },
|
||||
],
|
||||
},
|
||||
],
|
||||
|
||||
Reference in New Issue
Block a user