nicholaschiang / hammock

Move your newsletters outside of your inbox. Focus on and learn from the content you love in a distraction-free reading space.
https://readhammock.com
GNU Affero General Public License v3.0
11 stars 1 forks source link

perf: mutate infinite SWR hooks #137

Closed nicholaschiang closed 3 years ago

nicholaschiang commented 3 years ago

Fixes PD-146

vercel[bot] commented 3 years ago

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployments, click below or on the icon next to each commit.

hammock – ./

🔍 Inspect: https://vercel.com/readhammock/hammock/DZJTw8h5Krwza3nBktWEHD3kVabk
✅ Preview: https://hammock-git-mutate-readhammock.vercel.app

linear[bot] commented 3 years ago
PD-146 Mutate infinite highlights page data

Just like we mutate the entire `/feed` data when a single message is updated, I should mutate the entire `/highlights` data when a highlight is updated.

codecov[bot] commented 3 years ago

Codecov Report

Merging #137 (a9dd697) into develop (639ae01) will decrease coverage by 8.68%. The diff coverage is 55.26%.

Impacted file tree graph

@@             Coverage Diff             @@
##           develop     #137      +/-   ##
===========================================
- Coverage    46.27%   37.58%   -8.69%     
===========================================
  Files           70       80      +10     
  Lines         1087     1333     +246     
  Branches       317      389      +72     
===========================================
- Hits           503      501       -2     
- Misses         584      832     +248     
Impacted Files Coverage Δ
pages/api/auth/[...nextauth].ts 9.09% <0.00%> (-0.59%) :arrow_down:
pages/messages/[id].tsx 0.00% <0.00%> (ø)
lib/hooks/messages.ts 82.14% <85.00%> (-7.86%) :arrow_down:
components/feed.tsx 100.00% <100.00%> (ø)
lib/api/verify/auth.ts 53.84% <100.00%> (+3.84%) :arrow_up:
pages/api/redirect.ts
lib/utils/numid.ts 33.33% <0.00%> (ø)
lib/xpath.ts 0.00% <0.00%> (ø)
components/icons/highlight.tsx 0.00% <0.00%> (ø)
... and 8 more

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 639ae01...a9dd697. Read the comment docs.