aboutsummaryrefslogtreecommitdiff
path: root/Timeline/ClientApp/src/app/timeline/TimelinePageTemplateUI.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'Timeline/ClientApp/src/app/timeline/TimelinePageTemplateUI.tsx')
-rw-r--r--Timeline/ClientApp/src/app/timeline/TimelinePageTemplateUI.tsx10
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}