Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

handling infinite scroll session key at hooks #32

Merged
merged 4 commits into from Apr 12, 2022
Merged

handling infinite scroll session key at hooks #32

merged 4 commits into from Apr 12, 2022

Conversation

hyesungoh
Copy link
Owner

as is

// index.tsx
useInfiniteScroll({sessionKey: "home", ...})

to be

// index.tsx
useInfiniteScroll({...}) // there is no key

// useInfiniteScroll.ts
const sessionKey = useMemo(() => `isv-${router.asPath}`, [router]);

reduce human mistake possibility

@hyesungoh hyesungoh self-assigned this Apr 12, 2022
@hyesungoh hyesungoh added the refactor This seems like refactorable label Apr 12, 2022
@vercel
Copy link

vercel bot commented Apr 12, 2022

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.

comet-land-blog – ./apps/blog

🔍 Inspect: https://vercel.com/hyesungoh/comet-land-blog/4Khy6HTcSsDvxHTVbcyoDhbKCQQS
✅ Preview: https://comet-land-blog-git-30-hyesungoh.vercel.app

comet-land-resume – ./apps/resume

🔍 Inspect: https://vercel.com/hyesungoh/comet-land-resume/5iAxn4oStXhh9AAHiSCj4GrVh8Jn
✅ Preview: https://comet-land-resume-git-30-hyesungoh.vercel.app

@codecov-commenter
Copy link

codecov-commenter commented Apr 12, 2022

Codecov Report

Merging #32 (133dc83) into main (b322732) will decrease coverage by 0.01%.
The diff coverage is 0.00%.

❗ Current head 133dc83 differs from pull request most recent head f79cc72. Consider uploading reports for the commit f79cc72 to get more accurate results

@@            Coverage Diff             @@
##             main      #32      +/-   ##
==========================================
- Coverage   33.25%   33.24%   -0.02%     
==========================================
  Files         101      101              
  Lines        2875     2876       +1     
  Branches      480      480              
==========================================
  Hits          956      956              
- Misses       1919     1920       +1     
Impacted Files Coverage Δ
apps/blog/src/hooks/useInfiniteScroll.ts 0.00% <0.00%> (ø)
apps/blog/src/pages/category/[category].tsx 0.00% <0.00%> (ø)
apps/blog/src/pages/index.tsx 0.00% <0.00%> (ø)

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 154e25e...f79cc72. Read the comment docs.

@cypress
Copy link

cypress bot commented Apr 12, 2022



Test summary

1 0 0 0


Run details

Project blog
Status Passed
Commit c5d2985 ℹ️
Started Apr 12, 2022 2:58 PM
Ended Apr 12, 2022 2:58 PM
Duration 00:18 💡
OS Linux Ubuntu - 20.04
Browser Electron 94

View run in Cypress Dashboard ➡️


This comment has been generated by cypress-bot as a result of this project's GitHub integration settings. You can manage this integration in this project's settings in the Cypress Dashboard

@cypress
Copy link

cypress bot commented Apr 12, 2022



Test summary

1 0 0 0


Run details

Project resume
Status Passed
Commit c5d2985 ℹ️
Started Apr 12, 2022 2:59 PM
Ended Apr 12, 2022 2:59 PM
Duration 00:15 💡
OS Linux Ubuntu - 20.04
Browser Electron 94

View run in Cypress Dashboard ➡️


This comment has been generated by cypress-bot as a result of this project's GitHub integration settings. You can manage this integration in this project's settings in the Cypress Dashboard

@hyesungoh hyesungoh linked an issue Apr 12, 2022 that may be closed by this pull request
@lgtm-com
Copy link
Contributor

lgtm-com bot commented Apr 12, 2022

This pull request introduces 1 alert when merging 66bdd72 into 154e25e - view on LGTM.com

new alerts:

  • 1 for Overwritten property

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
refactor This seems like refactorable
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Infinite scroll Session key handling inside of hook
2 participants