You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was wondering if anyone would be able to help out with changing the :id in the url of the frontend for the restaurants to a custom field that is also unique (let's say slug). This in order to prettify the urls.
Suggested change in the containers/App/index.js file from: <Route path="/:id/:content" component={RestaurantPage} exact />
to <Route path="/:slug/:content" component={RestaurantPage} exact />
Any help here would be appreciated!
Regards,
Yannick
The text was updated successfully, but these errors were encountered:
This may be a very long path what you can do is send a post request instead of a get request everytime the category is requested and return the response to the react api context, the items content should then automatically update when it gets new props, essentially turning your application to a SPA (Single page application), although this is a very long approach
Hi there,
I was wondering if anyone would be able to help out with changing the :id in the url of the frontend for the restaurants to a custom field that is also unique (let's say slug). This in order to prettify the urls.
Suggested change in the containers/App/index.js file from:
<Route path="/:id/:content" component={RestaurantPage} exact />
to
<Route path="/:slug/:content" component={RestaurantPage} exact />
Any help here would be appreciated!
Regards,
Yannick
The text was updated successfully, but these errors were encountered: