This commit adds the necessary components and hooks to implement a beer search feature on the website. It includes the following changes:
- Add a new BeerSearch API route that returns a list of beers matching a search query.
- Implement a new hook useBeerPostSearch that utilizes SWR to fetch data from the API and parse it using a schema.
- Add a new page SearchPage that displays a search input field and a list of beer search results.
- Use lodash's debounce function to avoid making too many requests while the user is typing in the search input field.
- Updated BeerPostHeader in /id page to use semantic HTML tags
- Removed the getServerSidesProps fn in /login and /register. Moved the redirect logic over to the client, will redirect on the client side.
- Added delete BeerPost option on the edit page.
This commit adds the necessary functionality to confirm a user's account.
It includes the addition of a new column in the user table to track whether an account is confirmed or not, and the implementation of JWT for confirmation tokens.
This commit integrates the SparkPost API as well as React Email to send dynamic emails for whatever purpose.
Upon user registration, a confirmation email will be sent to the user.
Implement edit beer post functionality.
Register, edit and create beer post forms are now using the same layout found in components/ui/forms/BeerPostFormPageLayout. All forms are now extracted into their own components and are now found in components.
Added redirectIfLoggedIn getServerSidesProp fn for login and register pages.