aboutsummaryrefslogtreecommitdiff
path: root/FrontEnd
diff options
context:
space:
mode:
Diffstat (limited to 'FrontEnd')
-rw-r--r--FrontEnd/src/views/timeline-common/Timeline.tsx7
1 files changed, 6 insertions, 1 deletions
diff --git a/FrontEnd/src/views/timeline-common/Timeline.tsx b/FrontEnd/src/views/timeline-common/Timeline.tsx
index d812463a..e028dddc 100644
--- a/FrontEnd/src/views/timeline-common/Timeline.tsx
+++ b/FrontEnd/src/views/timeline-common/Timeline.tsx
@@ -14,6 +14,7 @@ import {
} from "@/http/timeline";
import { getTimelinePostUpdate$ } from "@/services/timeline";
+import { useUser } from "@/services/user";
import useValueWithRef from "@/utilities/useValueWithRef";
@@ -38,6 +39,8 @@ export interface TimelineProps {
const Timeline: React.FC<TimelineProps> = (props) => {
const { timelineName, className, style, reloadKey } = props;
+ const user = useUser();
+
const [state, setState] = React.useState<
"loading" | "loaded" | "offline" | "notexist" | "forbid" | "error"
>("loading");
@@ -149,8 +152,10 @@ const Timeline: React.FC<TimelineProps> = (props) => {
/>
{timeline?.postable ? (
<TimelinePostEdit timeline={timeline} onPosted={onReload.current} />
- ) : (
+ ) : user == null ? (
<TimelinePostEditNoLogin />
+ ) : (
+ <TimelineEmptyItem startSegmentLength={20} center="none" current />
)}
</div>
);