feat: implement pagination and NewWrapper on donation and investment screens

- Implement pagination on investment screens (ScreenMyHolding, ScreenInvestor, ScreenRecapOfNews, ScreenListOfNews)
- Implement pagination on donation screens (ScreenStatus)
- Update API functions to support pagination with page parameter (apiInvestmentGetAll, apiInvestmentGetInvestorById, apiInvestmentGetNews, apiDonationGetByStatus)
- Replace ViewWrapper with NewWrapper for better UI experience
- Update app directory files to use new modular components from screens directory
- Add pull-to-refresh and infinite scroll functionality
- Improve performance by loading data incrementally
- Apply NewWrapper to donation create and create-story screens

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
This commit is contained in:
2026-02-09 17:35:54 +08:00
parent 38a6b424e8
commit 2705f96b01
12 changed files with 185 additions and 136 deletions

View File

@@ -40,16 +40,19 @@ export async function apiDonationGetOne({
export async function apiDonationGetByStatus({
authorId,
status,
page = "1",
}: {
authorId: string;
status: string;
page?: string;
}) {
const authorQuery = `/${authorId}`;
const statusQuery = `/${status}`;
const pageQuery = `?page=${page}`;
try {
const response = await apiConfig.get(
`/mobile/donation${authorQuery}${statusQuery}`
`/mobile/donation${authorQuery}${statusQuery}${pageQuery}`
);
return response.data;
} catch (error) {