| 123456789101112131415161718192021222324252627 |
- import { dehydrate, QueryClient } from '@tanstack/react-query';
- import { serverSideTranslations } from 'next-i18next/serverSideTranslations';
- import PaginationComponentRQ from '../components/pagination/react-query/PaginationComponentRQ';
- import { getData } from '../requests/dataRequest';
-
- const Home = () => {
- return (
- <>
- <PaginationComponentRQ></PaginationComponentRQ>
- </>
- );
- };
-
- export async function getStaticProps({ locale }) {
- const queryClient = new QueryClient();
-
- await queryClient.prefetchQuery(['randomData', 1], () => getData(1));
-
- return {
- props: {
- dehydratedState: dehydrate(queryClient),
- ...(await serverSideTranslations(locale, ['pagination'])),
- },
- };
- }
-
- export default Home;
|