ghulamabbas2 / bookit Goto Github PK
View Code? Open in Web Editor NEWHome Page: bookit.vercel.app
Home Page: bookit.vercel.app
Bookings aren't getting saved after stripe payment. It shows this error, "Schema hasn't been registered for model "Room" Use mongoose.model(name, schema)
Server Error
Error: Error serializing .initialState.allRooms.error
returned from getServerSideProps
in "/".
Reason: undefined
cannot be serialized as JSON. Please use null
or omit this value.
I got above error.Can anybody please help resolving this issue ?
Can you update next redux wrapper to version 7x , it is a slighly different changes, but can you update it ?
This is official documentation for next-redux-wrapper libray:
Upgrade from 6.x to 7.x
Signature of createWrapper has changed: instead of createWrapper you should use createWrapper<Store>, all types will be automatically inferred from Store.
GetServerSidePropsContext and GetStaticPropsContext are no longer exported from next-redux-wrapper, you should use GetServerSideProps, GetServerSidePropsContext, GetStaticProps and GetStaticPropsContext directly from next.
All signatures like ({store, req, res, ...}) => { ... } were changed to store => ({req, res, ...}) => { ... } in order to keep Next.js internals free of modifications and for better typings support.
In version 7.x you have to manually wrap all getInitialProps with proper wrappers: wrapper.getInitialPageProps and wrapper.getInitialAppProps.
window.NEXT_REDUX_WRAPPER_STORE has been removed as it was causing issues with hot reloading
Hi dear,
I'm following your course. When I add this line in my project it throws the error
export const getServerSideProps = wrapper.getServerSideProps(async ({req, store}) => {
await store.dispatch(getRooms(req))
})
Server Error
TypeError: nextCallback is not a function
This error happened while generating the page. Any console logs will be displayed in the terminal window.
Hello Ghulam,
I tried the code bellow but the list is not working. Can you please help. Thanks.
<div className="form-group">
<label htmlFor="guest_field">No. of Guests</label>
<select
className="form-control"
id="guest_field"
value={guests}
onChange={(e) => setGuests(e.target.value)}
>
{[1, 2, 3, 4, 5, 6].map((num) => {
<option key={num} value={num}>
{num}
</option>;
})}
</select>
</div>
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.