This repository has been archived by the owner on Mar 24, 2024. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
The most significant changes involve the
OrderComment
function in C…
…omment.tsx and the `Cmts` function in Get.ts. In Comment.tsx, the `useRequest` import was removed and replaced with `Hub.Order.Get.useCmts` in the `OrderComment` function. The version annotation was also updated. In Get.ts, the `Cmts` function was transformed from an asynchronous function to a hook, using `useSWR` to fetch data and `useAsyncEffect` to process it. The initial state of `res` in the `useItems` function was also changed. 1. The `useRequest` import from "ahooks" was removed from Comment.tsx. This suggests a shift away from using this library in the codebase. 2. The version annotation in the `OrderComment` function was updated from 0.1.0 to 1.0.0 in Comment.tsx, indicating a major version change. 3. The `useRequest` function was replaced with `Hub.Order.Get.useCmts` in the `OrderComment` function in Comment.tsx, suggesting a change in the way comments are fetched. 4. The initial state of `res` was changed from an empty array to undefined in the `useItems` function in Get.ts, which could affect how the function handles initial data. 5. The `Cmts` function in Get.ts was updated from an asynchronous function to a hook. This change allows the function to use `useSWR` to fetch data and `useAsyncEffect` to process the data. 6. The `Cmts` function now returns an object containing the request and the processed data, providing more information to the caller. 7. The `since` annotation in the `Cmts` function was updated from 1.3.0 to 1.3.5 in Get.ts, indicating a minor version change.
- Loading branch information