feat(thank-you-page): convert to client component with confetti and UI enhancements

- Changed from server to client component to enable interactive features like confetti animation
- Removed server-side translations and hardcoded Portuguese text for simplicity
- Added confetti effect on page load and improved success icon with animations
- Updated buttons and share functionality for better user experience
- This enhances the donation thank you page with celebratory elements and client-side interactivity
This commit is contained in:
Evandro Fonseca Junior committed 2025-10-26 22:12:43 -03:00
1 parent ad62dd0de2
commit 8271d1fa31
7 files changed
+191 -54

No files matched your search

+32
View File
@@ -0,0 +1,32 @@
import { NextRequest, NextResponse } from "next/server";
import { getPaymentStatus } from "@/lib/payment-cache";
export async function GET(request: NextRequest) {
try {
const { searchParams } = new URL(request.url);
const pixId = searchParams.get("pixId");
if (!pixId) {
return NextResponse.json(
{ error: "pixId é obrigatório" },
{ status: 400 }
);
}
const status = getPaymentStatus(pixId);
return NextResponse.json({
pixId,
paid: status?.paid || false,
paidAt: status?.paidAt,
amount: status?.amount,
anonymous: status?.anonymous,
});
} catch (error) {
console.error("Erro ao verificar status do pagamento:", error);
return NextResponse.json(
{ error: "Erro ao verificar status" },
{ status: 500 }
);
}
}