diff options
Diffstat (limited to 'FrontEnd/src/views/user/index.tsx')
-rw-r--r-- | FrontEnd/src/views/user/index.tsx | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/FrontEnd/src/views/user/index.tsx b/FrontEnd/src/views/user/index.tsx index 70b4f60f..7913b788 100644 --- a/FrontEnd/src/views/user/index.tsx +++ b/FrontEnd/src/views/user/index.tsx @@ -1,13 +1,19 @@ import React from "react"; -import { useParams } from "react-router"; +import { useParams } from "react-router-dom"; import TimelinePageTemplate from "../timeline-common/TimelinePageTemplate"; import UserCard from "./UserCard"; +import { UiLogicError } from "@/common"; + import "./index.css"; const UserPage: React.FC = () => { - const { username } = useParams<{ username: string }>(); + const { username } = useParams(); + + if (username == null) { + throw new UiLogicError("No route param 'username'."); + } const [reloadKey, setReloadKey] = React.useState<number>(0); |