init displayAs
This commit is contained in:
parent
bc6bced1b8
commit
6d1d1bfc44
@ -34,7 +34,7 @@ const Timeline = (props: TimelineProps) => {
|
|||||||
};
|
};
|
||||||
}, [props]);
|
}, [props]);
|
||||||
const feed: TimelineFeed = useTimelineFeed(props.subject, feedOptions);
|
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 { muted, isEventMuted } = useModeration();
|
||||||
const filterPosts = useCallback(
|
const filterPosts = useCallback(
|
||||||
|
@ -27,7 +27,7 @@ export interface TimelineFollowsProps {
|
|||||||
* A list of notes by "subject"
|
* A list of notes by "subject"
|
||||||
*/
|
*/
|
||||||
const TimelineFollows = (props: TimelineFollowsProps) => {
|
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 [latest, setLatest] = useState(unixNow());
|
||||||
const feed = useSyncExternalStore(
|
const feed = useSyncExternalStore(
|
||||||
cb => FollowsFeed.hook(cb, "*"),
|
cb => FollowsFeed.hook(cb, "*"),
|
||||||
|
Loading…
Reference in New Issue
Block a user