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

Implement localStorage saving of tx pagination batch size #821

Merged
merged 1 commit into from
Dec 21, 2023

Conversation

kylanhurt
Copy link
Contributor

Remove unnecessary console log

Fixes #820

Description

Used localStorage to set user's preference for how many txs per "page". If localStorage value is ever invalid it will replace it with a valid value (smallest option, currently 10). URL query params take precedence over localStorage value

Test scenarios

Go to homepage and start changing the items per page value. Removing params from URL and reloading should show saved setting # of transactions. Keeping query params in URL should have those params take precedence over user setting.

Checklist:

  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • My changes generate no new warnings
  • I have removed any unnecessary console messages

Copy link

netlify bot commented Dec 13, 2023

Deploy Preview for obe-staging ready!

Name Link
🔨 Latest commit c2f5174
🔍 Latest deploy log https://app.netlify.com/sites/obe-staging/deploys/6583aa82b418e40008dbf188
😎 Deploy Preview https://deploy-preview-821--obe-staging.netlify.app/
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@kylanhurt kylanhurt added the ✨ Enhancement Improvements on existing features label Dec 13, 2023
Copy link

netlify bot commented Dec 13, 2023

Deploy Preview for obe-testnet ready!

Name Link
🔨 Latest commit c2f5174
🔍 Latest deploy log https://app.netlify.com/sites/obe-testnet/deploys/6583aa82fc4c8f0008172e1a
😎 Deploy Preview https://deploy-preview-821--obe-testnet.netlify.app/
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link

cloudflare-pages bot commented Dec 13, 2023

Deploying with  Cloudflare Pages  Cloudflare Pages

Latest commit: c2f5174
Status: ✅  Deploy successful!
Preview URL: https://c1170ba6.open-block-explorer.pages.dev
Branch Preview URL: https://820-local-storage.open-block-explorer.pages.dev

View logs

Remove unnecessary console log

Remove unnecessary localStorage.removeItem

Add useful comments for tx pagination localStorage routine

Get transaction table rows per page to defer to url params
@donnyquixotic donnyquixotic merged commit ed0b9bf into develop Dec 21, 2023
10 checks passed
@donnyquixotic donnyquixotic deleted the 820-local-storage branch December 21, 2023 04:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
✨ Enhancement Improvements on existing features
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants