issues
search
kuru-studio
/
kuru-studio-social-web
👩💻 Kuru Studio Social Web
http://social.kuru.studio
1
stars
5
forks
source link
Hotfix: Code Cleanup
#29
Closed
BosEriko
closed
2 years ago
BosEriko
commented
2 years ago
Changes made
move definitions to their own folder
move types to their own folder
move requests to an index file
move validations to their own folder
move utils to their own folder
remove redux saga
remove md5
remove unused exports
use gql and variable
remove name for mutations
remove anonymous functions on pages
create a dynamic page for profiles
remove user list request
add user data request
remove overkill types
update name of kuru-studio-design on package.json
add specific names to the definitions
add a simple profile query
add profile page that uses get static props
add proper comments
How does the solution address the problem
This PR will clean some of the tech debt.
BosEriko
commented
2 years ago
To-do:
[x] remove all redux-saga codes
[x] use variables for your GQL requests instead of function + variables combo
[x] use swr for login and register
BosEriko
commented
2 years ago
To-do:
[x] Create a simple profile page that fetches only the email
[x] Create an endpoint on kuru-studio-social-server to fetch a single user from an id
[x] use SWR for fetching data for profile
References:
https://stackoverflow.com/questions/65480752/swr-with-graphql-request-how-to-add-variables-in-swr
https://swr.vercel.app/docs/getting-started
BosEriko
commented
2 years ago
[x] Use getStaticProps on the profile page
[x] Make a utility wrapper for useSWR that accepts 3 parameters (definition, request and the variables). The md5 will be included inside of it.
Changes made
How does the solution address the problem
This PR will clean some of the tech debt.