1
0
forked from Kieran/snort

init displayAs

This commit is contained in:
Martti Malmi 2023-11-28 22:07:35 +02:00
parent bc6bced1b8
commit 6d1d1bfc44
2 changed files with 2 additions and 2 deletions

View File

@ -34,7 +34,7 @@ const Timeline = (props: TimelineProps) => {
};
}, [props]);
const feed: TimelineFeed = useTimelineFeed(props.subject, feedOptions);
const [displayAs, setDisplayAs] = useState<DisplayAs>("feed");
const [displayAs, setDisplayAs] = useState<DisplayAs>(props.displayAs ?? "feed");
const { muted, isEventMuted } = useModeration();
const filterPosts = useCallback(

View File

@ -27,7 +27,7 @@ export interface TimelineFollowsProps {
* A list of notes by "subject"
*/
const TimelineFollows = (props: TimelineFollowsProps) => {
const [displayAs, setDisplayAs] = useState<"feed" | "grid">("feed");
const [displayAs, setDisplayAs] = useState<"feed" | "grid">(props.displayAs ?? "feed");
const [latest, setLatest] = useState(unixNow());
const feed = useSyncExternalStore(
cb => FollowsFeed.hook(cb, "*"),