Eugen Rochko 1de3b951eb [Glitch] Add new overview landing page setting
Port 07d099cbf7b646b7dc715c3bfe3a8ea453e9eafb to glitch-soc

Signed-off-by: Claire <claire.github-309c@sitedethib.com>
2026-05-26 22:13:10 +02:00

36 lines
1015 B
TypeScript

import { useEffect } from 'react';
import { FormattedMessage } from 'react-intl';
import { expandCommunityTimeline } from 'flavours/glitch/actions/timelines';
import { Callout } from 'flavours/glitch/components/callout';
import StatusListContainer from 'flavours/glitch/features/ui/containers/status_list_container';
import { useAppDispatch } from 'flavours/glitch/store';
import classes from './styles.module.scss';
export const LatestActivity = () => {
const dispatch = useAppDispatch();
useEffect(() => {
void dispatch(expandCommunityTimeline());
}, [dispatch]);
return (
<StatusListContainer
prepend={
<Callout className={classes.banner}>
<FormattedMessage
id='custom_homepage.these_are_the_latest_posts'
defaultMessage='These are the latest 40 posts from accounts on this server.'
/>
</Callout>
}
scrollKey='custom_homepage'
timelineId='community'
maxItems={40}
bindToDocument
/>
);
};