diff --git a/frontend/src/App.tsx b/frontend/src/App.tsx index 46a5992..0a6e25a 100644 --- a/frontend/src/App.tsx +++ b/frontend/src/App.tsx @@ -1,119 +1,13 @@ -import { useState } from 'react' -import reactLogo from './assets/react.svg' -import viteLogo from './assets/vite.svg' -import heroImg from './assets/hero.png' -import './App.css' +import Header from './Header'; +import LoginPage from './LoginPage'; function App() { - const [count, setCount] = useState(0) - return ( <> -
-
- - React logo - Vite logo -
-
-

Get started

-

- Edit src/App.tsx and save to test HMR -

-
- -
- -
- -
-
- -

Documentation

-

Your questions, answered

- -
-
- -

Connect with us

-

Join the Vite community

- -
-
- -
-
+
+
+ +
) } diff --git a/frontend/src/Header.tsx b/frontend/src/Header.tsx new file mode 100644 index 0000000..756a1d3 --- /dev/null +++ b/frontend/src/Header.tsx @@ -0,0 +1,11 @@ +export default function Header() { + return ( +
+

MyApp

+ +
+ ); +} diff --git a/frontend/src/LoginPage.tsx b/frontend/src/LoginPage.tsx new file mode 100644 index 0000000..6b08657 --- /dev/null +++ b/frontend/src/LoginPage.tsx @@ -0,0 +1,48 @@ +import { useState } from 'react'; + +export default function LoginPage() { + const [username, setUsername] = useState(''); + const [password, setPassword] = useState(''); + + const handleSubmit = async (e: React.FormEvent) => { + e.preventDefault(); + console.log('Login attempt:', { username, password }); + // TODO: Implement actual JWT authentication logic here + }; + + return ( +
+
+

Login

+
+
+ + setUsername(e.target.value)} + required + /> +
+
+ + setPassword(e.target.value)} + required + /> +
+ +
+
+
+ ); +} diff --git a/frontend/src/ProductCard.tsx b/frontend/src/ProductCard.tsx new file mode 100644 index 0000000..3c685ff --- /dev/null +++ b/frontend/src/ProductCard.tsx @@ -0,0 +1,18 @@ +interface Product { + name: string; + price: number; + description: string; +} + +export default function ProductCard({ product }: { product: Product }) { + return ( +
+

{product.name}

+

${product.price.toFixed(2)}

+

{product.description}

+ +
+ ); +}