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

GEN-637 - feat: added a service to retrieve Trustpilot data #2705

Merged
merged 1 commit into from
Jul 10, 2023

Conversation

guilhermespopolin
Copy link
Contributor

@guilhermespopolin guilhermespopolin commented Jul 6, 2023

Describe your changes

  • Adds a service to retrieve Hedvig's Trustpilot data from their API.

How the whole thing works:

  1. There's a new service - apps/store/src/services/trustpilot/trustpilot.tsx - which fetch that data from Trustpilot API and store it in a Jotai's atom so it can be available through the whole app. We then fetch that data and proper hydrate the atom in the apps/store/src/pages/[[...slug]].tsx and apps/store/src/components/LayoutWithMenu/LayoutWithMenu.tsx files respectively.
  2. TrustpilotBlock then reads that data from the atom and proper display it.
Screenshot 2023-07-06 at 17 41 54

Justify why they are needed

Requested by design/editors

Can be tested here

@vercel
Copy link

vercel bot commented Jul 6, 2023

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

Name Status Preview Comments Updated (UTC)
hedvig-dot-com ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 10, 2023 0:09am
onboarding ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 10, 2023 0:09am

@guilhermespopolin
Copy link
Contributor Author

guilhermespopolin commented Jul 6, 2023

@notion-workspace
Copy link

Copy link
Contributor

@robinandeer robinandeer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Neat -- just added some comments to consider

apps/store/.env.local.example Outdated Show resolved Hide resolved
apps/store/src/pages/api/cron/trustpilot.ts Outdated Show resolved Hide resolved
apps/store/src/services/trustpilot/trustpilot.tsx Outdated Show resolved Hide resolved
Copy link
Contributor

@robinandeer robinandeer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice work!

apps/store/src/services/trustpilot/trustpilot.tsx Outdated Show resolved Hide resolved
@guilhermespopolin
Copy link
Contributor Author

@guilhermespopolin started a stack merge that includes this pull request via Graphite.

@guilhermespopolin guilhermespopolin merged commit e5bd5b3 into main Jul 10, 2023
3 checks passed
@guilhermespopolin
Copy link
Contributor Author

@guilhermespopolin merged this pull request with Graphite.

@guilhermespopolin guilhermespopolin deleted the GEN-637/feat/trustpilot-block branch July 10, 2023 12:41
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.

2 participants