File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change 1
1
// App.jsx or App.tsx
2
- import { BrowserRouter as Router , Routes , Route } from 'react-router-dom'
2
+ import { Routes , Route } from 'react-router-dom'
3
3
import Header from './components/Header'
4
4
import Footer from './components/Footer'
5
5
import Home from './pages/Home'
@@ -11,7 +11,6 @@ import Photos from './pages/Photos'
11
11
import "./App.css"
12
12
function App ( ) {
13
13
return (
14
- < Router >
15
14
< >
16
15
< Header />
17
16
< main className = "container" >
@@ -26,7 +25,6 @@ function App() {
26
25
</ main >
27
26
< Footer />
28
27
</ >
29
- </ Router >
30
28
)
31
29
}
32
30
Original file line number Diff line number Diff line change @@ -2,9 +2,11 @@ import React from 'react'
2
2
import ReactDOM from 'react-dom/client'
3
3
import App from './App.tsx'
4
4
import './index.css'
5
-
5
+ import { HashRouter } from 'react-router-dom'
6
6
ReactDOM . createRoot ( document . getElementById ( 'root' ) ! ) . render (
7
7
< React . StrictMode >
8
+ < HashRouter >
8
9
< App />
10
+ </ HashRouter >
9
11
</ React . StrictMode > ,
10
12
)
You can’t perform that action at this time.
0 commit comments