Reverting change, it didn't work

This commit is contained in:
Frank
2023-10-04 20:07:45 -06:00
parent ab7a720899
commit 89bf68fe38

View File

@@ -29,14 +29,10 @@ const addRevalidateAndRedux = async (
return getStaticProps;
};
export const getStaticProps = async (props: any) =>
addRevalidateAndRedux(
props,
wrapper.getStaticProps((store) => async (context) => {
export const getStaticProps = wrapper.getStaticProps(
(store) => async (context) => {
store.dispatch(getPost.initiate(context?.params?.slug));
const [post] = await Promise.all(
store.dispatch(getRunningQueriesThunk())
);
const [post] = await Promise.all(store.dispatch(getRunningQueriesThunk()));
return {
props: {
@@ -44,12 +40,8 @@ export const getStaticProps = async (props: any) =>
},
revalidate: 60,
};
})
);
// export const getStaticProps = wrapper.getStaticProps(
// (store) => async (context) => {}
// );
}
);
const Post = ({ post }: any) => {
const dateUploaded = new Date(post.date).toDateString();