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:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user