File tree Expand file tree Collapse file tree 7 files changed +10
-47
lines changed
Expand file tree Collapse file tree 7 files changed +10
-47
lines changed Original file line number Diff line number Diff line change 1+ Remove /#/ from URLs
Load Diff This file was deleted.
Load Diff This file was deleted.
Load Diff This file was deleted.
Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -3,14 +3,14 @@ import { MoveApp } from '@oasisprotocol/rose-app-move'
33import { stakeRouteObject } from '@oasisprotocol/rose-app-stake'
44import { wrapRouteObject } from '@oasisprotocol/rose-app-wrap'
55import { DiscoverApp } from '@oasisprotocol/rose-app-discover'
6- import { createHashRouter , RouterProvider } from 'react-router-dom'
6+ import { createBrowserRouter , RouterProvider } from 'react-router-dom'
77
88import { App } from './App.tsx'
99import { ProvidersWithSidebar } from './ProvidersWithSidebar.tsx'
1010
1111import '@oasisprotocol/rose-app-ui/core/index.css'
1212
13- const router = createHashRouter ( [
13+ const router = createBrowserRouter ( [
1414 {
1515 path : '' ,
1616 element : < ProvidersWithSidebar /> ,
@@ -43,4 +43,10 @@ const router = createHashRouter([
4343 } ,
4444] )
4545
46+ // Redirect from old URLs to new URLs
47+ if ( location . pathname + location . hash === '/#/wrap' ) location . href = '/wrap'
48+ if ( location . pathname + location . hash === '/#/stake' ) location . href = '/stake'
49+ if ( location . pathname + location . hash === '/#/move' ) location . href = '/move'
50+ if ( location . pathname + location . hash === '/#/discover' ) location . href = '/discover'
51+
4652ReactDOM . createRoot ( document . getElementById ( 'root' ) ! ) . render ( < RouterProvider router = { router } /> )
Original file line number Diff line number Diff line change @@ -16,7 +16,7 @@ export default defineConfig({
1616 APP_VERSION : JSON . stringify ( version ) ,
1717 BUILD_COMMIT : JSON . stringify ( execSync ( 'git rev-parse HEAD' ) . toString ( ) ) ,
1818 BUILD_DATETIME : JSON . stringify ( new Date ( ) . getTime ( ) ) ,
19- GITHUB_REPOSITORY_URL : JSON . stringify ( 'https://github.com/oasisprotocol/rose/' ) ,
19+ GITHUB_REPOSITORY_URL : JSON . stringify ( 'https://github.com/oasisprotocol/rose-app /' ) ,
2020 OASIS_HOME_PAGE_URL : JSON . stringify ( 'https://oasisprotocol.org/' ) ,
2121 OASIS_DOCS_PAGE_URL : JSON . stringify ( 'https://docs.oasis.io/' ) ,
2222 PRIVACY_POLICY_URL : JSON . stringify ( 'https://oasisprotocol.org/privacy-policy' ) ,
You can’t perform that action at this time.
0 commit comments