added max 4 limit to fetch feed on in_english page

This commit is contained in:
dev
2021-05-28 19:32:54 +03:00
parent 58b2ecfaa5
commit 25a8f0fa4b
+6 -2
View File
@@ -14,6 +14,10 @@ const eventOptions = {
limit: 4,
};
const feedOptions = {
limit: 4,
};
interface InitialProps {
initialEvents: Event[];
initialFeed: Post[];
@@ -21,7 +25,7 @@ interface InitialProps {
const InEnglishPage: NextPage<InitialProps> = ({ initialEvents, initialFeed }) => {
const eventResult = useFetchEvents({ initialData: initialEvents, options: eventOptions });
const feedResult = useFetchFeed({ initialData: initialFeed });
const feedResult = useFetchFeed({ initialData: initialFeed, options: feedOptions });
return (
<>
@@ -37,7 +41,7 @@ const InEnglishPage: NextPage<InitialProps> = ({ initialEvents, initialFeed }) =
export const getStaticProps: GetStaticProps<InitialProps> = async () => {
const initialEvents = await EventApi.getEvents(eventOptions);
const initialFeed = await FeedApi.getFeed();
const initialFeed = await FeedApi.getFeed(feedOptions);
return {
props: {
initialEvents,