0a5491eede
* 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
13 lines
358 B
TypeScript
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} />;
|
|
}
|