snort/packages/app/src/Pages/EventPage.tsx
Sam Samskies 0a5491eede
Fix broken note links (#380)
* fix broken note links

* remove unused prop

* make comment easier to understand

* handle case where root event ID is missing

* add missing return

* fix root finding logic

* update comment
2023-03-04 13:41:29 -08:00

13 lines
358 B
TypeScript

import { useParams } from "react-router-dom";
import Thread from "Element/Thread";
import useThreadFeed from "Feed/ThreadFeed";
import { parseId } from "Util";
export default function EventPage() {
const params = useParams();
const id = parseId(params.id ?? "");
const thread = useThreadFeed(id);
return <Thread key={id} notes={thread.notes} />;
}