Closed RobinHeidenis closed 1 year ago
The latest updates on your projects. Learn more about Vercel for Git ↗︎
Name | Status | Preview | Comments | Updated (UTC) |
---|---|---|---|---|
bucketlist | ✅ Ready (Inspect) | Visit Preview | 💬 Add feedback | Sep 7, 2023 1:02am |
Enhanced Scope and Prop Type Checking
The developer has updated several files (ListHeaderMenu.tsx
, BucketListItems.tsx
, MovieListHeader.tsx
, MovieListItems.tsx
, ShowListHeader.tsx
, ShowListItems.tsx
) to have more specific prop type checking. They have introduced new types PropsWithList
, PropsWithMovieList
, PropsWithShowList
and PropsWithBucketList
that make the code safer by ensuring the right type of data is passed to components.
Code Cleanup in 'usePermissionsCheck.ts' File
Unused imports have been removed and refactored the function signature to be more precise. Also, data checks like isOwner
or isCollaborator
now access data directly from the list object instead of the previous list data variable.
Streamlining '[list].tsx' File
Previous destructuring from useQuery was updated to provide better-named properties. Several component props were changed to pick the list directly instead of the previous list data. Checks (like isBucketList
) and variable references (like list.total
) were updated to use the new list object.
Efficiency Boost in 'lists.ts' File Developers added a check to determine if the list has been modified since the last request by comparing 'updatedAt' fields. If the list has not been modified, it returns a '{ "code": "NOT_MODIFIED" }' object instead of the full list, saving bandwidth and processing power.
Extended Prop Type Checking in 'List.ts' File
The developer introduced more specific types (PropsWithGenericList
, PropsWithList
, PropsWithMovieList
, PropsWithShowList
, and PropsWithBucketList
) to enrich prop type checking. The checks (isBucketList
, isMovieList
, isShowList
) got updated to use a more generic LooseListType
.
This Pull Request aims to raise code quality by introducing better type checks (thus reducing potential bugs) and improve efficiency with smart loading.
BUC-75 Add updatedAt parameter to get list API route, to avoid having to refetch the whole list + all items from the database