diff options
author | crupest <crupest@outlook.com> | 2021-12-06 20:46:35 +0800 |
---|---|---|
committer | crupest <crupest@outlook.com> | 2021-12-06 20:46:35 +0800 |
commit | 2d9ef25d6171890496b1c9dd48a91b11c40eca7c (patch) | |
tree | ac48193d08296dd880005e8e0399b0b48a4bcc5d /FrontEnd/src/views/timeline/index.tsx | |
parent | de0c85ca334d06f042e685b8263a3261b8f8b055 (diff) | |
download | timeline-2d9ef25d6171890496b1c9dd48a91b11c40eca7c.tar.gz timeline-2d9ef25d6171890496b1c9dd48a91b11c40eca7c.tar.bz2 timeline-2d9ef25d6171890496b1c9dd48a91b11c40eca7c.zip |
...
Diffstat (limited to 'FrontEnd/src/views/timeline/index.tsx')
-rw-r--r-- | FrontEnd/src/views/timeline/index.tsx | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/FrontEnd/src/views/timeline/index.tsx b/FrontEnd/src/views/timeline/index.tsx index c5bfd7ab..02d773dc 100644 --- a/FrontEnd/src/views/timeline/index.tsx +++ b/FrontEnd/src/views/timeline/index.tsx @@ -1,11 +1,17 @@ import React from "react"; -import { useParams } from "react-router"; +import { useParams } from "react-router-dom"; + +import { UiLogicError } from "@/common"; import TimelinePageTemplate from "../timeline-common/TimelinePageTemplate"; import TimelineCard from "./TimelineCard"; const TimelinePage: React.FC = () => { - const { name } = useParams<{ name: string }>(); + const { name } = useParams(); + + if (name == null) { + throw new UiLogicError("No route param 'name'."); + } const [reloadKey, setReloadKey] = React.useState<number>(0); |