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 | 2ea82a4325a7d80718dfb11dd225cb2c9e7357bd (patch) | |
tree | 55fbfcf14b5c7222b55330e42c85d3b5a609da80 /Timeline/ClientApp/src/app/timeline/TimelinePageTemplateUI.tsx | |
parent | bfcd27afb82d44505a2b7b0bfd1335ea2d8205b7 (diff) | |
download | timeline-2ea82a4325a7d80718dfb11dd225cb2c9e7357bd.tar.gz timeline-2ea82a4325a7d80718dfb11dd225cb2c9e7357bd.tar.bz2 timeline-2ea82a4325a7d80718dfb11dd225cb2c9e7357bd.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}
|