Create Homepage

This commit is contained in:
Ray 2023-09-05 09:03:39 +00:00 committed by GitHub
parent 85ce7c85ff
commit 5489b44682
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 0 deletions

View File

@ -7,9 +7,11 @@ import "react-bootstrap/Navbar"
import "react-bootstrap/Nav" import "react-bootstrap/Nav"
import './App.css'; import './App.css';
import { About } from "./pages/About"; import { About } from "./pages/About";
import { Home } from "./pages/Home";
import Container from "react-bootstrap/Container"; import Container from "react-bootstrap/Container";
import { Nav, Navbar } from "react-bootstrap/esm"; import { Nav, Navbar } from "react-bootstrap/esm";
function App() { function App() {
const FBapp = initializeApp(FirebaseConfig); const FBapp = initializeApp(FirebaseConfig);
return ( return (
@ -25,6 +27,7 @@ function App() {
</Container> </Container>
</Navbar> </Navbar>
<Routes> <Routes>
<Route path="/" element={ <Home greeting="Hey you, this is home page!" /> } />
<Route path="/about" element={ <About greeting="Hey you, this is about page!" /> } /> <Route path="/about" element={ <About greeting="Hey you, this is about page!" /> } />
</Routes> </Routes>
</div> </div>

3
src/pages/Home.js Normal file
View File

@ -0,0 +1,3 @@
export function Home ( props ) {
return ( <h1>{props.greeting} </h1>)
}