Import Browser Router and sorrounded App.

This commit is contained in:
Ray 2023-09-05 08:38:49 +00:00 committed by GitHub
parent 8ce6e485e2
commit 3e3f7bbdac
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 1 deletions

View File

@ -1,5 +1,6 @@
import { FirebaseConfig } from "./config/Config"; import { FirebaseConfig } from "./config/Config";
import { initializeApp } from "firebase/app"; import { initializeApp } from "firebase/app";
import {Routes, Route} from "react-router-dom";
import "react-bootstrap/Container" import "react-bootstrap/Container"
import "react-bootstrap/Navbar" import "react-bootstrap/Navbar"
@ -22,7 +23,7 @@ function App() {
</Nav> </Nav>
</Container> </Container>
</Navbar> </Navbar>
<h1>React App</h1>
</div> </div>
); );
} }

View File

@ -4,11 +4,14 @@ import './index.css';
import App from './App'; import App from './App';
import reportWebVitals from './reportWebVitals'; import reportWebVitals from './reportWebVitals';
import '../node_modules/bootstrap/dist/css/bootstrap.min.css'; import '../node_modules/bootstrap/dist/css/bootstrap.min.css';
import { BrowserRouter } from 'react-router-dom';
const root = ReactDOM.createRoot(document.getElementById('root')); const root = ReactDOM.createRoot(document.getElementById('root'));
root.render( root.render(
<React.StrictMode> <React.StrictMode>
<BrowserRouter>
<App /> <App />
</BrowserRouter>
</React.StrictMode> </React.StrictMode>
); );