added footer and header

This commit is contained in:
2026-06-23 16:05:51 +02:00
parent b43c9989f4
commit 86933e15c0
3 changed files with 42 additions and 29 deletions
+9 -29
View File
@@ -1,34 +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 reactLogo from "./assets/react.svg";
import viteLogo from "./assets/vite.svg";
import Header from "./components/Header";
import Footer from "./components/Footer";
import "./App.css";
function App() {
const [count, setCount] = useState(0)
return (
<>
<section id="center">
<div className="hero">
<img src={heroImg} className="base" width="170" height="179" alt="" />
<img src={reactLogo} className="framework" alt="React logo" />
<img src={viteLogo} className="vite" alt="Vite logo" />
</div>
<div>
<h1>Get started</h1>
<p>
Edit <code>src/App.jsx</code> and save to test <code>HMR</code>
</p>
</div>
<button
type="button"
className="counter"
onClick={() => setCount((count) => count + 1)}
>
Count is {count}
</button>
</section>
<Header />
<div className="ticks"></div>
@@ -115,8 +94,9 @@ function App() {
<div className="ticks"></div>
<section id="spacer"></section>
<Footer />
</>
)
);
}
export default App
export default App;
+9
View File
@@ -0,0 +1,9 @@
function Footer() {
return (
<div id="foot">
<h3>The react project</h3>
</div>
);
}
export default Footer;
+24
View File
@@ -0,0 +1,24 @@
import { useState } from "react";
function Header() {
const [count, setCount] = useState(0);
return (
<section id="center">
<div>
<h1>The react project</h1>
<p>
Edit <code>src/App.jsx</code> and save to test <code>HMR</code>
</p>
</div>
<button
type="button"
className="counter"
onClick={() => setCount((count) => count + 1)}
>
Count is {count}
</button>
</section>
);
}
export default Header;