Commit 6423587d by jay

.

1 parent 3b658768
...@@ -6,45 +6,27 @@ const DoctorOnCall = () => { ...@@ -6,45 +6,27 @@ const DoctorOnCall = () => {
<div> <div>
<h1>Hello world</h1> <h1>Hello world</h1>
<span className=""></span> <span className=""></span>
<Image width="3000px" height="600px" src="/banner/abu-faqs-d.png"></Image> <Image
priority={true}
width="3000px"
height="600px"
src="/banner/abu-faqs-d.png"
></Image>
</div> </div>
); );
}; };
export default DoctorOnCall; export default DoctorOnCall;
const bindMiddleware = middleware => { // This function gets called at build time
if (process.env.NODE_ENV !== "production") { export async function getStaticProps() {
const { composerWithDevTools, composeWithDevTools } = require("redux-devtools-extension"); // Call an external API endpoint to get posts
return composeWithDevTools(applyMiddleware(...middleware)); // const res = await fetch('https://.../posts')
} // const posts = await res.json()
return applyMiddleware(...middleware);
};
const reducer = (state, action) => {
if (action.type === HYDRATE) {
const nextState = { ...state, ...action.payload };
return nextState;
} else {
return reducers(state, action);
}
};
const initStore = () => {
return createStore(reducer, bindMiddleware([thunkMiddleware]));
};
export const wrapper = createWrapper(initStore);
/** For server side rendering */
export const getStaticProps = wrapper.getStaticProps(
(store) =>
async ({ req, query }) => {
// Get the menu data.
// By returning { props: { posts } }, the Blog component
// will receive `posts` as a prop at build time
return { return {
props: {}, props: {},
revalidate: 100,
}; };
} }
);
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!