Reverting change, it didn't work
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user