From 35e48ea92d6658a26578ee2321bc982532e3d51c Mon Sep 17 00:00:00 2001
From: crupest <crupest@outlook.com>
Date: Sat, 8 Aug 2020 21:41:41 +0800
Subject: ...

---
 Timeline/ClientApp/src/app/timeline/TimelinePageTemplateUI.tsx | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

(limited to 'Timeline/ClientApp/src/app/timeline/TimelinePageTemplateUI.tsx')

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}
-- 
cgit v1.2.3

