Added frontend routing hack
This commit is contained in:
@@ -15,15 +15,26 @@
|
||||
user's mobile device or desktop. See https://developers.google.com/web/fundamentals/web-app-manifest/
|
||||
-->
|
||||
<link rel="manifest" href="%PUBLIC_URL%/manifest.json" />
|
||||
<!--
|
||||
Notice the use of %PUBLIC_URL% in the tags above.
|
||||
It will be replaced with the URL of the `public` folder during the build.
|
||||
Only files inside the `public` folder can be referenced from the HTML.
|
||||
|
||||
Unlike "/favicon.ico" or "favicon.ico", "%PUBLIC_URL%/favicon.ico" will
|
||||
work correctly both with client-side routing and a non-root public URL.
|
||||
Learn how to configure a non-root public URL by running `npm run build`.
|
||||
-->
|
||||
<!-- Start Single Page Apps for GitHub Pages -->
|
||||
<script type="text/javascript">
|
||||
(function(l) {
|
||||
if (l.search) {
|
||||
var q = {};
|
||||
l.search.slice(1).split('&').forEach(function(v) {
|
||||
var a = v.split('=');
|
||||
q[a[0]] = a.slice(1).join('=').replace(/~and~/g, '&');
|
||||
});
|
||||
if (q.p !== undefined) {
|
||||
window.history.replaceState(null, null,
|
||||
l.pathname.slice(0, -1) + (q.p || '') +
|
||||
(q.q ? ('?' + q.q) : '') +
|
||||
l.hash
|
||||
);
|
||||
}
|
||||
}
|
||||
}(window.location))
|
||||
</script>
|
||||
<!-- End Single Page Apps for GitHub Pages -->
|
||||
<title>React App</title>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
Reference in New Issue
Block a user