Skip to content

Commit

Permalink
format
Browse files Browse the repository at this point in the history
  • Loading branch information
Aifert committed Mar 13, 2024
1 parent 789ed01 commit a9a2080
Showing 1 changed file with 10 additions and 11 deletions.
21 changes: 10 additions & 11 deletions src/pages/donations-success.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,19 +17,18 @@ export default function DonationSuccess() {
`/api/getSession?session_id=${sessionIdFromURL}`
);

if(response.ok){
const sessionData = await response.json();
if (response.ok) {
const sessionData = await response.json();

if (sessionData) {
if (sessionData.session.amount_total == amountInCentsfromURL) {
const formatted_amount = parseInt(amountInCentsfromURL) / 100;

setAmount(formatted_amount);
}
if (sessionData) {
if (sessionData.session.amount_total == amountInCentsfromURL) {
const formatted_amount = parseInt(amountInCentsfromURL) / 100;

setAmount(formatted_amount);
}
}
else{
setAmount(-1);
}
} else {
setAmount(-1);
}
}
};
Expand Down

0 comments on commit a9a2080

Please sign in to comment.