diff options
author | crupest <crupest@outlook.com> | 2020-08-08 21:41:41 +0800 |
---|---|---|
committer | crupest <crupest@outlook.com> | 2020-08-08 21:41:41 +0800 |
commit | 35e48ea92d6658a26578ee2321bc982532e3d51c (patch) | |
tree | 5f66f55214f20743b036aed6b7eda6be267cd817 /Timeline/ClientApp/src/app/timeline/TimelinePageTemplateUI.tsx | |
parent | 65a6e047bd7dc7e1833804b38984da05172f6109 (diff) | |
download | timeline-35e48ea92d6658a26578ee2321bc982532e3d51c.tar.gz timeline-35e48ea92d6658a26578ee2321bc982532e3d51c.tar.bz2 timeline-35e48ea92d6658a26578ee2321bc982532e3d51c.zip |
...
Diffstat (limited to 'Timeline/ClientApp/src/app/timeline/TimelinePageTemplateUI.tsx')
-rw-r--r-- | Timeline/ClientApp/src/app/timeline/TimelinePageTemplateUI.tsx | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/Timeline/ClientApp/src/app/timeline/TimelinePageTemplateUI.tsx b/Timeline/ClientApp/src/app/timeline/TimelinePageTemplateUI.tsx index 8b9f8765..70507988 100644 --- a/Timeline/ClientApp/src/app/timeline/TimelinePageTemplateUI.tsx +++ b/Timeline/ClientApp/src/app/timeline/TimelinePageTemplateUI.tsx @@ -24,7 +24,7 @@ import Timeline, { import AppBar from '../common/AppBar';
import TimelinePostEdit, { TimelinePostSendCallback } from './TimelinePostEdit';
-type TimelinePostSyncState = 'loadcache' | 'syncing' | 'synced' | 'offline';
+type TimelinePostSyncState = 'cache' | 'syncing' | 'synced' | 'offline';
const TimelinePostSyncStateBadge: React.FC<{
state: TimelinePostSyncState;
@@ -37,7 +37,7 @@ const TimelinePostSyncStateBadge: React.FC<{ <div style={style} className={clsx('timeline-sync-state-badge', className)}>
{(() => {
switch (state) {
- case 'loadcache':
+ case 'cache':
case 'syncing': {
return (
<>
@@ -201,12 +201,12 @@ export default function TimelinePageTemplateUI<TManageItems>( if (timeline != null) {
let timelineBody: React.ReactElement;
if (postListState != null) {
- if (postListState.state === 'notexist') {
+ if (postListState.type === 'notexist') {
throw new UiLogicError(
'Timeline is not null but post list state is notexist.'
);
}
- if (postListState.state === 'forbid') {
+ if (postListState.type === 'forbid') {
timelineBody = (
<p className="text-danger">{t('timeline.messageCantSee')}</p>
);
@@ -230,7 +230,7 @@ export default function TimelinePageTemplateUI<TManageItems>( <div>
<TimelinePostSyncStateBadge
style={{ top: topHeight }}
- state={postListState.state}
+ state={postListState.type}
/>
<Timeline
containerRef={timelineRef}
|