aboutsummaryrefslogtreecommitdiff
path: root/FrontEnd/src/pages/timeline/index.tsx
blob: 6cd1ded0ba7dce4a627cc46c7a6abe9c85c7f817 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
import { useParams } from "react-router-dom";

import { UiLogicError } from "~src/common";

import Timeline from "./Timeline";

export default function TimelinePage() {
  const { owner, timeline: timelineNameParam } = useParams();

  if (owner == null || owner == "")
    throw new UiLogicError("Route param owner is not set.");

  const timeline = timelineNameParam || "self";

  return <Timeline timelineOwner={owner} timelineName={timeline} />;
};