- Migrate 25 donation screens to OS_Wrapper (tabs, list, detail, forms, transaction flow)
- Add contentPadding={PADDING_INLINE} to 7 list/recap screens for consistent spacing
- Migrate crowdfunding screen to OS_Wrapper
- Fix voting tabs layout height to use OS_IOS_HEIGHT/OS_ANDROID_HEIGHT constants
- Migrate news detail screen to OS_Wrapper
- Update TASK-005 progress to 73% complete (104 files migrated)
Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
44 lines
1.1 KiB
TypeScript
44 lines
1.1 KiB
TypeScript
/* eslint-disable react-hooks/exhaustive-deps */
|
|
import {
|
|
DummyLandscapeImage,
|
|
OS_Wrapper,
|
|
StackCustom,
|
|
TextCustom,
|
|
} from "@/components";
|
|
import { apiDonationGetOne } from "@/service/api-client/api-donation";
|
|
import { useFocusEffect, useLocalSearchParams } from "expo-router";
|
|
import { useCallback, useState } from "react";
|
|
|
|
export default function DonationDetailStory() {
|
|
const { id } = useLocalSearchParams();
|
|
const [data, setData] = useState<any>();
|
|
|
|
useFocusEffect(
|
|
useCallback(() => {
|
|
onLoadData();
|
|
}, [id])
|
|
);
|
|
|
|
const onLoadData = async () => {
|
|
try {
|
|
const response = await apiDonationGetOne({
|
|
id: id as string,
|
|
category: "permanent",
|
|
});
|
|
|
|
setData(response.data.CeritaDonasi);
|
|
} catch (error) {
|
|
console.log("[ERROR]", error);
|
|
}
|
|
};
|
|
return (
|
|
<OS_Wrapper>
|
|
<StackCustom>
|
|
<TextCustom>{data?.pembukaan || "-"}</TextCustom>
|
|
<DummyLandscapeImage imageId={data?.imageId} />
|
|
<TextCustom>{data?.cerita || "-"}</TextCustom>
|
|
</StackCustom>
|
|
</OS_Wrapper>
|
|
);
|
|
}
|