-
Notifications
You must be signed in to change notification settings - Fork 2
Yap review #8
Description
-
This component is a good canditate to try out the ts-pattern package for states
selecta/src/provider/SignInProvider.tsx
Line 26 in 5addba3
if (status == "loading") { -
Add prettier or biome to help you with format consistency, I see some of these are single quotes and some are double quotes
selecta/src/provider/AuthProvider.tsx
Line 1 in 5addba3
'use client' -
For writing test descriptions, I personally look at it as the "should" between
itand what goes in(...)is silent i.e. the statement "getSessionToken should return a valid token" in test form could be written asdescribe("getSessionToken")next line will beit("return a valid token")so between the describe and it, there's a silent 'should' which somewhat makes the test read betterLine 60 in 5addba3
it("valid session", () => { -
ofetch from unjs.io is much much better than the polyfilled fetch out there. Just sayin
selecta/src/lib/spotify/utils.ts
Line 55 in 5addba3
const getTokenResponse = await fetch(URLS.Token, { -
just
selecta/src/lib/spotify/constants.ts
Line 42 in 5addba3
// @ts-ignore -
Why do react people do this? This component has a single node already, what's the point of the empty tags?
<> -
I got to use it a bit, it's pretty neat. It took a while to figure out how to get started but that's a story for another day