blob: 02d773dc16b271f3422d8476557b273584226669 (
plain)
| 1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
 | import React from "react";
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();
  if (name == null) {
    throw new UiLogicError("No route param 'name'.");
  }
  const [reloadKey, setReloadKey] = React.useState<number>(0);
  return (
    <TimelinePageTemplate
      timelineName={name}
      notFoundI18nKey="timeline.timelineNotExist"
      reloadKey={reloadKey}
      CardComponent={TimelineCard}
      onReload={() => setReloadKey(reloadKey + 1)}
    />
  );
};
export default TimelinePage;
 |