diff --git a/webapp/src/components/ui/button.tsx b/webapp/src/components/ui/button.tsx new file mode 100644 index 0000000..ed6f884 --- /dev/null +++ b/webapp/src/components/ui/button.tsx @@ -0,0 +1,27 @@ +import React from 'react'; +import { useRouter } from 'next/router'; + +interface ButtonProps { + children: string; // Only allow text + onClick?: () => void; // Optional + className?: string; // Optional, will override default style + route?: string; // Optional re-routing +} + +export function Button({ children, onClick, className = "", route }: ButtonProps) { + const router = useRouter(); + + const handleClick = () => { + if (onClick) onClick(); // Execute custom logic, if provided + if (route) router.push(route); // Navigate to the route, if specified + }; + + return ( + + ); +} \ No newline at end of file diff --git a/webapp/src/components/ui/card.tsx b/webapp/src/components/ui/card.tsx new file mode 100644 index 0000000..7cf4ecf --- /dev/null +++ b/webapp/src/components/ui/card.tsx @@ -0,0 +1,22 @@ +import React, { ReactNode } from 'react'; + +interface CardProps { + children: ReactNode; // any valid React children + className?: string; +} + +export function Card({ children, className = "" }: CardProps) { + return ( +
+ {children} +
+ ); +} + +export function CardContent({ children, className = "" }: CardProps) { + return ( +
+ {children} +
+ ); +} \ No newline at end of file diff --git a/webapp/src/pages/home.tsx b/webapp/src/pages/home.tsx new file mode 100644 index 0000000..3fc9f68 --- /dev/null +++ b/webapp/src/pages/home.tsx @@ -0,0 +1,46 @@ +import React from 'react'; +import { Card, CardContent } from "@/components/ui/card"; +import { Button } from "@/components/ui/button"; + +export default function HomePage() { + return ( +
+
+ {/* Left Section - What we do */} + + +

What we do

+

+ Donations for charities are inconsistent and many charities struggle with finances. + To solve this problem, we are creating Stock Charity, a charity that uses donations + to buy stocks that payout dividends and then uses those dividends to finance charities year-round. +

+
+
+ + {/* Right Section - Donate Button and Stats */} +
+ {/* Donate Button */} + + + {/* Stats Card */} + + +

We have over

+

$xxx,xxx.xx

+

in stocks

+

which have paid out over

+

$xxx,xxx.xx

+

in dividends to over

+

xxx charities

+
+
+
+
+
+ ); +}