Commit Graph

16 Commits

Author SHA1 Message Date
Aaron William Po
796a5fce3f Styling changes and refactor
Switch google fonts to use Next.js font optimization, animate comment fade in, and refactor beer like handler and comment submit handler.
2023-04-04 20:51:29 -04:00
Aaron William Po
a4362a531c Add custom hooks for time distance and retrieving like count
Documentation added to all custom hooks
2023-04-03 23:32:32 -04:00
Aaron William Po
f8ecaa51b5 Update beer like button to use custom hook to load like status 2023-04-02 21:51:10 -04:00
Aaron William Po
de3964dbfa Rewrote beer by id page comments to load on client 2023-04-02 21:50:42 -04:00
Aaron William Po
b69dbc95b4 Work on brewery page, refactors
Refactor query types to explicitly use z.infer
2023-03-31 21:13:35 -04:00
Aaron William Po
2efc506250 Add beer search feature
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.
2023-03-27 19:02:03 -04:00
Aaron William Po
cf6a8309f1 Rework pagination and cookies 2023-03-19 18:04:13 -04:00
Aaron William Po
6b12cb72c5 Refactor BeerPostHeader, refactor login and register
- 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.
2023-03-15 21:30:26 -04:00
Aaron William Po
11b3304c54 Update page auth HOF type definitions
Added vercel config, update packages
2023-02-25 19:17:49 -05:00
Aaron William Po
5561f209e9 Update useUser.ts
Fixed issue where the current user was not being added to UserContext
2023-02-13 19:27:36 -05:00
Aaron William Po
ea516e91b5 Rename "user" column in beerPostLikes, add ERD gen 2023-02-13 17:15:10 -05:00
Aaron William Po
249bfdaf5a fix logout 2023-02-13 16:15:10 -05:00
Aaron William Po
7240cb0792 Fix beer likes and db client 2023-02-13 13:08:05 -05:00
Aaron William Po
80261a713b Add comments pagination, login and register pages 2023-02-13 10:56:09 -05:00
Aaron William Po
dbd342fd3e Refactor codebase, format 2023-02-09 04:03:52 -05:00
Aaron William Po
9a9d8bcb94 Implement login, add useUser hook 2023-02-06 17:19:28 -05:00