fix render issue
This commit is contained in:
22
src/App.js
22
src/App.js
@@ -1,7 +1,27 @@
|
||||
import React from "react";
|
||||
import { BrowserRouter as Router, Route, Routes } from "react-router-dom";
|
||||
import MainNavigation from "./components/MainNavigation";
|
||||
import SideNavigation from "./components/SideNavigation";
|
||||
import MarkdownContent from "./components/MarkdownContent";
|
||||
import "./App.css";
|
||||
|
||||
const App = () => {
|
||||
return <h1>Welcome to My React Project</h1>;
|
||||
return (
|
||||
<Router>
|
||||
<div className="app-container">
|
||||
<MainNavigation />
|
||||
<div className="content-container">
|
||||
<SideNavigation />
|
||||
<main className="main-content">
|
||||
<Routes>
|
||||
<Route path="/" element={<h1>Welcome to My React Project</h1>} />
|
||||
<Route path="/markdown/:id" element={<MarkdownContent />} />
|
||||
</Routes>
|
||||
</main>
|
||||
</div>
|
||||
</div>
|
||||
</Router>
|
||||
);
|
||||
};
|
||||
|
||||
export default App;
|
||||
Reference in New Issue
Block a user