Closed MohammadPCh closed 1 month ago
The latest updates on your projects. Learn more about Vercel for Git βοΈ
Name | Status | Preview | Comments | Updated (UTC) |
---|---|---|---|---|
giveth-dapps-v2 | β Ready (Inspect) | Visit Preview | π¬ Add feedback | Sep 28, 2024 10:16am |
The pull request introduces several changes across multiple files, primarily focusing on enhancing type safety in TypeScript, adding a new GraphQL mutation for deleting draft projects, and restructuring imports for better organization. It also integrates the @tanstack/react-query
library for data fetching in some components, replacing Apollo Client's previous approach. Additionally, new constants and functions are defined to manage user projects more effectively.
File | Change Summary |
---|---|
package.json |
Added new development dependency: @tanstack/react-query-devtools version ^5.58.0 . |
src/apollo/apolloClient.ts |
Enhanced type safety by updating variable and function parameter types; defined return types. |
src/apollo/gql/gqlProjects.ts |
Added new GraphQL mutation DELETE_DRAFT_PROJECT accepting projectId as an argument. |
src/components/views/project/projectDonations/ProjectRecurringDonationTable.tsx |
Updated import path for EOrderBy enumeration. |
src/components/views/userProfile/UserProfile.view.tsx |
Removed EOrderBy enum and IOrder interface for simplification. |
src/components/views/userProfile/donationsTab/oneTimeTab/OneTimeDonationsTable.tsx |
Updated import paths for EOrderBy and IOrder . |
src/components/views/userProfile/donationsTab/oneTimeTab/OneTimeTab.tsx |
Changed import paths for IOrder and EOrderBy . |
src/components/views/userProfile/projectsTab/DeleteProjectModal.tsx |
Added functionality for project deletion, including a new prop for refetching projects. |
src/components/views/userProfile/projectsTab/ProfileProjectsTab.tsx |
Refactored to use react-query for data fetching instead of Apollo Client. |
src/components/views/userProfile/projectsTab/ProjectItem.tsx |
Updated IProjectItem interface and JSX structure, added refetchProjects prop. |
src/components/views/userProfile/projectsTab/constants.ts |
Introduced constants for user projects per page and ordering criteria. |
src/components/views/userProfile/projectsTab/services.ts |
Added fetchUserProjects function for retrieving user projects with pagination and ordering. |
src/components/views/userProfile/projectsTab/type.ts |
Added EOrderBy enum and IOrder interface for project ordering. |
package.json
file, relevant for the new dependency added in this PR.DeleteProjectModal
component, which includes the use of the DELETE_DRAFT_PROJECT
mutation referenced in this PR.π° In the garden of code, changes bloom bright,
With queries and types, we take flight.
A project to delete, with just a small click,
Refetching our data, oh, what a neat trick!
So hop along, friends, letβs celebrate cheer,
For a cleaner, safer codebase is here! πΌ
1271
Summary by CodeRabbit
Release Notes
New Features
DELETE_DRAFT_PROJECT
for deleting draft projects.refetchProjects
prop to theDeleteProjectModal
for refreshing project lists after deletion.fetchUserProjects
to retrieve user projects with pagination and ordering.Improvements
ProfileProjectsTab
to utilizereact-query
for improved data fetching.Bug Fixes
EOrderBy
andIOrder
to streamline component dependencies.Chores
@tanstack/react-query-devtools
for improved development experience.