-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #133 from Motouom/Implement-frontend-ok-page-and-f…
…ake-api-#27 Feat(front-end):Implemented the okpage frontend.
- Loading branch information
Showing
2 changed files
with
56 additions
and
28 deletions.
There are no files selected for viewing
35 changes: 35 additions & 0 deletions
35
power-pay-frontend/src/components/SendMoneyConfirmation.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
interface SendMoneyConfirmationProps { | ||
onSuccess: (successMessage: string) => void; | ||
} | ||
|
||
const SendMoneyConfirmation: React.FC<SendMoneyConfirmationProps> = ({ onSuccess }) => { | ||
// fake data made while waiting for others to do the actual implementation | ||
const recipientName = "Mr Stephane"; | ||
const amount = 100.50; | ||
const transferDate = new Date().toLocaleDateString(); // Today's date | ||
const referenceNumber = "1234567890"; | ||
const newBalance = 500.25; | ||
|
||
// success message to be displayed on the screen | ||
const successMessage = `Successful transfer of FCFA${amount.toFixed(2)} to ${recipientName} on ${transferDate} . Reference: ${referenceNumber} , New Balance: FCFA${newBalance.toFixed(2)}`; | ||
|
||
return ( | ||
<div className="flex justify-center items-center mb-34 bg-800 text-black text-sm"> | ||
<div className=""> | ||
<div className="rounded-lg w-80 m-auto px-4 py-2 text-lg absolute inset-x-0 top-12 bg-gray-100"> | ||
<div> | ||
<h1 className="text-2xl font-bold pb-10">Confirmation Alert!</h1> | ||
<p className="text-md">{successMessage}</p> | ||
</div> | ||
</div> | ||
<div className="pt-12"> | ||
<button className="rounded-full bg-blue-950 hover:bg-blue-900 w-80 m-auto px-4 py-2 text-white text-lg absolute inset-x-0 bottom-12" onClick={() => onSuccess(successMessage)}> | ||
OK | ||
</button> | ||
</div> | ||
</div> | ||
</div> | ||
); | ||
}; | ||
|
||
export default SendMoneyConfirmation; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters