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

Replace fetch to use custom React Query implementation with AxiosProvider #431

Merged
merged 12 commits into from
Aug 17, 2024

Conversation

petark7
Copy link
Member

@petark7 petark7 commented Aug 5, 2024

Implement AxiosProvider instead of fetch and replace in every place where normal fetch was used to use React Query instead.

  • provide central location in /api for fetch-related files

DanielK-12 and others added 7 commits July 17, 2024 16:36
- implement folder structure for queries and api
- use axios instead of fetch
- add <AxiosProvider>
- use API url from .env
Use React Query implementation in getUsers
- transfer addNewPost.tsx to components folder
- use project react query structure
- Footer: transfer react query logic in /api folder + add toast messages
- lift toast container to layout.tsx
- ContactForm: transfer react query logic in /api folder
Copy link

vercel bot commented Aug 5, 2024

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

Name Status Preview Comments Updated (UTC)
app ✅ Ready (Inspect) Visit Preview 💬 Add feedback Aug 16, 2024 10:58pm

@petark7 petark7 linked an issue Aug 5, 2024 that may be closed by this pull request
api/AxiosProvider.tsx Outdated Show resolved Hide resolved
- remove unused pageTitle parameter in fetchBlogPosts()
edichoska
edichoska previously approved these changes Aug 11, 2024
@edichoska edichoska merged commit 8c1cacd into staging Aug 17, 2024
2 of 3 checks passed
@edichoska edichoska deleted the fetchToReactQuery-petar branch August 17, 2024 16:23
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.

[FE] Refactor the fetch calls to use react query
3 participants