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

feat: use worker to load and render polls #2857

Merged
merged 8 commits into from
May 15, 2023
Merged

Conversation

bigint
Copy link
Member

@bigint bigint commented May 15, 2023

What does this PR do?

🤖 Generated by Copilot at 5f545aa

The pull request refactors the web app and the snapshot relay worker to fetch the latest snapshot poll data and show the voter's status. It adds a new getLensterPoll function in the web app and modifies the getPoll handler in the worker. It also updates the Snapshot and SnapshotVote components in the web app to use the new function and data.

Related issues

Fixes # (issue)

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Enhancement (non-breaking small changes to existing functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

Explanation of the changes

🤖 Generated by Copilot at 5f545aa

  • Replace useSnapshotQuery hook with useQuery hook and getLensterPoll function to fetch poll data from snapshot relay worker (link,link,link,link,link)
  • Add getLensterPoll function in getLensterPoll.ts to make GET request to snapshot relay worker URL with proposalId and voter parameters (link)
  • Modify getPoll handler in getPoll.ts to query snapshot API with no-cache fetch policy and return response with no-store cache control header (link)

Emoji

📄🔄🎣

@vercel
Copy link

vercel bot commented May 15, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
prerender ✅ Ready (Inspect) Visit Preview May 15, 2023 7:15am
ui ✅ Ready (Inspect) Visit Preview May 15, 2023 7:15am
web ✅ Ready (Inspect) Visit Preview May 15, 2023 7:15am

@vercel vercel bot temporarily deployed to Preview – ui May 15, 2023 06:35 Inactive
@vercel vercel bot temporarily deployed to Preview – prerender May 15, 2023 06:36 Inactive
@vercel vercel bot temporarily deployed to Preview – prerender May 15, 2023 06:49 Inactive
@vercel vercel bot temporarily deployed to Preview – ui May 15, 2023 06:50 Inactive
@bigint bigint disabled auto-merge May 15, 2023 07:12
@vercel vercel bot temporarily deployed to Preview – ui May 15, 2023 07:13 Inactive
@bigint bigint merged commit 4517555 into main May 15, 2023
4 checks passed
@bigint bigint deleted the use-worker-poll-render branch May 15, 2023 07:15
@vercel vercel bot temporarily deployed to Preview – prerender May 15, 2023 07:15 Inactive
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant