created react structure

This commit is contained in:
2025-08-11 12:33:59 +02:00
parent cb5df58a37
commit 38b02c186f
3 changed files with 36 additions and 4 deletions

View File

@@ -1,11 +1,14 @@
import './App.css' import "./App.css";
import Layout from "./layout/Layout";
function App() { function App() {
return ( return (
<> <>
<Layout>
<h1>Hello World</h1>
</Layout>
</> </>
) );
} }
export default App export default App;

View File

@@ -0,0 +1,11 @@
import React from "react";
const Header: React.FC = () => {
return (
<header>
<h1>Header</h1>
</header>
);
};
export default Header;

View File

@@ -0,0 +1,18 @@
import React from "react";
import Header from "../components/Header";
type LayoutProps = {
children: React.ReactNode;
};
const Layout: React.FC<LayoutProps> = ({ children }) => {
return (
<>
<Header />
<main>{children}</main>
<footer></footer>
</>
);
};
export default Layout;