fix: Only show proof of payment link when attachment exists

Added conditional check to display proof of payment link only when
utilBillsProofOfPaymentAttachment is present in LocationCard.

Previously the link was always rendered, even when no attachment
was uploaded. This fix ensures the link only appears when there's
actually a proof of payment file available.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Knee Cola
2025-11-23 10:52:52 +01:00
parent 9d53fb1753
commit 8e5b1d7239

View File

@@ -70,7 +70,7 @@ export const LocationCard: FC<LocationCardProps> = ({ location, currency }) => {
<CheckCircleIcon className="h-5 w-5 text-success" /> <CheckCircleIcon className="h-5 w-5 text-success" />
</div> </div>
)} )}
{( {utilBillsProofOfPaymentAttachment && (
<Link <Link
href={`/share/proof-of-payment/${_id}/`} href={`/share/proof-of-payment/${_id}/`}
target="_blank" target="_blank"