aboutsummaryrefslogtreecommitdiff
path: root/Timeline/ClientApp/src/app/home/TimelineBoard.tsx
diff options
context:
space:
mode:
authorcrupest <crupest@outlook.com>2020-07-13 20:59:52 +0800
committercrupest <crupest@outlook.com>2020-07-13 20:59:52 +0800
commite69190abb09661caa19fa3905a0d8f3b7e72648b (patch)
tree8030e6a2539347ccb12f0a6bbd31a1f390c6a7b7 /Timeline/ClientApp/src/app/home/TimelineBoard.tsx
parent0a7c884be668267003d7666b444f1022c99a7148 (diff)
downloadtimeline-e69190abb09661caa19fa3905a0d8f3b7e72648b.tar.gz
timeline-e69190abb09661caa19fa3905a0d8f3b7e72648b.tar.bz2
timeline-e69190abb09661caa19fa3905a0d8f3b7e72648b.zip
Move front end to a submodule.
Diffstat (limited to 'Timeline/ClientApp/src/app/home/TimelineBoard.tsx')
-rw-r--r--Timeline/ClientApp/src/app/home/TimelineBoard.tsx54
1 files changed, 0 insertions, 54 deletions
diff --git a/Timeline/ClientApp/src/app/home/TimelineBoard.tsx b/Timeline/ClientApp/src/app/home/TimelineBoard.tsx
deleted file mode 100644
index ca77ab43..00000000
--- a/Timeline/ClientApp/src/app/home/TimelineBoard.tsx
+++ /dev/null
@@ -1,54 +0,0 @@
-import React from 'react';
-import clsx from 'clsx';
-import { Link } from 'react-router-dom';
-import { Spinner } from 'reactstrap';
-
-import { TimelineInfo } from '../data/timeline';
-
-import TimelineLogo from '../common/TimelineLogo';
-import UserTimelineLogo from '../common/UserTimelineLogo';
-
-export interface TimelineBoardProps {
- title?: string;
- timelines?: TimelineInfo[];
- className?: string;
-}
-
-const TimelineBoard: React.FC<TimelineBoardProps> = props => {
- const { title, timelines, className } = props;
-
- return (
- <div className={clsx('timeline-board', className)}>
- {title != null && <h3 className="text-center">{title}</h3>}
- {(() => {
- if (timelines == null) {
- return (
- <div className="d-flex flex-grow-1 justify-content-center align-items-center">
- <Spinner color="primary" />
- </div>
- );
- } else {
- return timelines.map(timeline => {
- const { name } = timeline;
- const isPersonal = name.startsWith('@');
- const url = isPersonal
- ? `/users/${timeline.owner.username}`
- : `/timelines/${name}`;
- return (
- <div key={name} className="timeline-board-item">
- {isPersonal ? (
- <UserTimelineLogo className="icon" />
- ) : (
- <TimelineLogo className="icon" />
- )}
- <Link to={url}>{name}</Link>
- </div>
- );
- });
- }
- })()}
- </div>
- );
-};
-
-export default TimelineBoard;