Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Created_Hello_World_Page #16

Merged
merged 3 commits into from
Apr 23, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions client/src/Components/Footer.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import React from "react";
//footer component
const Footer = () => {
return <div>Footer</div>;
};

export default Footer;
11 changes: 11 additions & 0 deletions client/src/Components/Header.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import React from "react";
//header component
const Header = () => {
return (
<div>
<button>click me</button>Header
</div>
);
};

export default Header;
21 changes: 14 additions & 7 deletions client/src/pages/Home.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
import { useEffect, useState } from "react";
import { Link } from "react-router-dom";
/*import { useEffect, useState } from "react";
import { Link } from "react-router-dom";*/
import Header from "../Components/Header";
import Footer from "../Components/Footer";

import "./Home.css";
import logo from "./logo.svg";
// import logo from "./logo.svg";

export function Home() {
const [message, setMessage] = useState("Loading...");
/*const [message, setMessage] = useState("Loading...");

useEffect(() => {
fetch("/api")
Expand All @@ -21,10 +23,15 @@ export function Home() {
.catch((err) => {
console.error(err);
});
}, []);
}, []);*/

return (
<main role="main">
<div>
<Header />
<p>Hello World</p>
<Footer />
</div>
/*<main role="main">
<div>
<img
className="logo"
Expand All @@ -37,7 +44,7 @@ export function Home() {
</h1>
<Link to="/about/this/site">About</Link>
</div>
</main>
</main>*/
);
}

Expand Down