Skip to content

Commit

Permalink
Feat(frontend): Implemented the Home page for the app
Browse files Browse the repository at this point in the history
  • Loading branch information
Motouom committed Jun 13, 2024
1 parent 7d992cb commit f7fe68a
Show file tree
Hide file tree
Showing 2 changed files with 47 additions and 0 deletions.
Binary file added power-pay-frontend/src/assets/Logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
47 changes: 47 additions & 0 deletions power-pay-frontend/src/components/Home.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
import { useNavigate } from 'react-router-dom';
import Logo from '../assets/Logo.png';
import React, { useEffect } from 'react';

const Home: React.FC = () => {
const navigate = useNavigate();

const handleCheckBalanceClick = () => {
navigate('/pin_balance');
};
const handleSendMoneyClick = () => {
navigate('/payment');
};

useEffect(() => {
// Prevent scrolling on mount
document.body.style.overflow = 'hidden';
// Re-enable scrolling when component unmounts
return () => {
document.body.style.overflow = 'auto';
};
}, []);

return (
<div className="flex flex-col items-center justify-center h-screen overflow-hidden">
<div className="rounded-full object-cover h-[100px] w-[300px] pt-0 pb-12 w-32 mb-8">
<img src={Logo} alt="Logo" />
</div>
<div className="w-80 m-auto">
<p className="pt-0 text-gray-700">Send money far and wide with ease.</p>
</div>
<div className="pt-12 w-80 m-auto">
<button className="rounded-full w-full px-4 py-2 my-4 text-white bg-blue-950 hover:border-blue-950 text-lg"
onClick={handleSendMoneyClick}>
Send Money
</button>
<button
className="rounded-full w-full px-4 py-2 text-white bg-blue-950 text-lg"
onClick={handleCheckBalanceClick}>
Check Balance
</button>
</div>
</div>
);
};

export default Home;

0 comments on commit f7fe68a

Please sign in to comment.