Skip to content

Fetch testimonials via React Query, server fn, and route loader - #10

Merged
frontendfixer merged 1 commit into
mainfrom
agent/testimonials-api-fetch-a815
Jul 25, 2026
Merged

Fetch testimonials via React Query, server fn, and route loader#10
frontendfixer merged 1 commit into
mainfrom
agent/testimonials-api-fetch-a815

Conversation

@frontendfixer

Copy link
Copy Markdown
Owner

Summary

  • Install and wire @tanstack/react-query with a shared QueryClient on router context and QueryClientProvider in the root shell.
  • Add getClientFeedback createServerFn that calls VITE_ADMIN_DOMAIN/api/client-feedback with Authorization: Bearer VITE_ADMIN_API_TOKEN.
  • Preload feedback in the / route loader via queryClient.ensureQueryData and pass the list into Testimonials.

Env

VITE_ADMIN_DOMAIN=http://localhost:3000
VITE_ADMIN_API_TOKEN=cfp_YOUR_TOKEN

See .env.example.

Open in Web Open in Cursor 

Wire up QueryClientProvider with router context, add a createServerFn
that calls /api/client-feedback with Bearer auth from VITE_ADMIN_* env
vars, preload via ensureQueryData on the home route, and render the
result in Testimonials.

Co-authored-by: Lakshmikanta Patra <frontendfixer@users.noreply.github.com>
@frontendfixer
frontendfixer marked this pull request as ready for review July 25, 2026 11:06
@cursor

cursor Bot commented Jul 25, 2026

Copy link
Copy Markdown

Bugbot is not enabled for your account, so this pull request was not reviewed.

Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs.

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, you can upgrade your account or add credits to your account and enable them for code reviews in your settings.

@frontendfixer
frontendfixer merged commit 7710ddd into main Jul 25, 2026
1 check passed
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