🐛 fix(router): has to browser

This commit is contained in:
eshanized
2024-12-23 10:32:57 +05:30
parent 3e10c4a46d
commit 8117bb45e6
2 changed files with 14 additions and 2 deletions

View File

@@ -90,6 +90,19 @@
gtag('js', new Date());
gtag('config', 'GTM-5HXGM54C');
</script>
<script type="text/javascript">
(function(l) {
if (l.search[1] === '/' ) {
var decoded = l.search.slice(1).split('&').map(function(s) {
return s.replace(/~and~/g, '&')
}).join('?');
window.history.replaceState(null, null,
l.pathname.slice(0, -1) + decoded + l.hash
);
}
}(window.location))
</script>
</head>
<body>

View File

@@ -1,5 +1,4 @@
import { HashRouter as Router, Routes, Route } from 'react-router-dom';
import { BrowserRouter as Router, Routes, Route } from 'react-router-dom';
import { Layout } from './components/layout/Layout';
import { Home } from './pages/Home';
import { About } from './pages/About';