Aaron William Po
90f2cc2c0c
Begin work on tab components for beer by id page
2023-04-11 22:18:29 -04:00
Aaron William Po
915adb722a
Implement react-intersection-observer to facilitate infinite scroll
...
Uses react-intersection-observer to load more comments when the last of the previously loaded comments is in the viewport.
2023-04-09 18:41:58 -04:00
Aaron William Po
8981bcb4b8
Replace useSWR with useSWRInfinite to facilitate infinite scrolling
2023-04-09 11:25:10 -04:00
Aaron William Po
cbc5671b0e
Fix login glitch where user session wouldn't load properly into context
2023-04-08 02:46:42 -04:00
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