1const claimRequestHandler = (claimUrl) => Linking.openURL(claimUrl);
2
3export const claimButton = ({status, isReturned, isClaimOpen, claimUrl, btnStyle}) => {
4 const updatedStatus = getStatus(status, isClaimOpen);
5 const showButton = (canViewClaim().includes(updatedStatus) && !isReturned);
6 return showButton && (
7 <PrimaryButton
8 style={btnStyle}
9 onPress={() => claimRequestHandler(claimUrl)}
10 >
11 {updatedStatus === STATUS.CLAIM_OPEN
12 ? "Track your claim"
13 : "File a claim"}
14 </PrimaryButton>
15 );
16}