Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Use navigate instead of push * Remove use navigate * Remove import * Remove history
- Loading branch information
Showing
4 changed files
with
3 additions
and
39 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,5 @@ | ||
import { createBrowserHistory } from "history"; | ||
import { BrowserHistoryBuildOptions } from "history/createBrowserHistory"; | ||
|
||
let browserHistoryOpts: BrowserHistoryBuildOptions = {}; | ||
|
||
let basename = document.baseURI.replace(window.location.origin, ""); | ||
// check if we are using base path, if not this always is `/` | ||
const baseLocation = new URL(document.baseURI); | ||
export const baseUrl = baseLocation.pathname; | ||
|
||
if (basename !== "") { | ||
browserHistoryOpts.basename = basename; | ||
} | ||
|
||
export default createBrowserHistory(browserHistoryOpts); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters