Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Apply routing fixes in browser #179

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@
"patch-package": "^6.4.7",
"prettier": ">=2",
"prettier-plugin-import-sort": "^0.0.7",
"ts-node": "^10.8.1"
"ts-node": "^10.8.1",
"@chakra-ui/cli": "^latest"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the fix! 👍
Can we set an explicit version here instead of latest?

},
"resolutions": {
"@babel/preset-react": "7.17.12",
Expand Down
3 changes: 2 additions & 1 deletion packages/extension/src/ui/AppRoutes.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
import { Route, Routes, RoutesConfig } from "@argent/stack-router"
import { Route, RoutesConfig } from "@argent/stack-router"
import { chakra } from "@chakra-ui/react"
import { FC, ReactNode, isValidElement, useMemo } from "react"
// import { Outlet, Route, Routes } from "react-router-dom" // reinstate in case of issues with @argent/stack-router
import { Outlet, useLocation } from "react-router-dom"
import {Routes} from "react-router-dom" // import Routes from react-router-dom

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You have error with imported from @Argent

What kind of error did you get with importing Routes from "@argent/stack-router"?

import { useAppState } from "./app.state"
import { ResponsiveBox } from "./components/Responsive"
Expand Down
6 changes: 3 additions & 3 deletions packages/extension/src/ui/index.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { StrictMode } from "react"
import { createRoot } from "react-dom/client"
import { BrowserRouter } from "react-router-dom"
import { BrowserRouter, HashRouter } from "react-router-dom"

import { initUiExtensionCloseListener } from "../shared/analytics"
import {
Expand Down Expand Up @@ -33,8 +33,8 @@ const root = createRoot(container)

root.render(
<StrictMode>
<BrowserRouter>
<HashRouter>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Routing in browser has a bug that on refresh the app lose the route

Could you please give me a bit more info about the issue? Do you mean refreshing the extension wallet?

<App />
</BrowserRouter>
</HashRouter>
</StrictMode>,
)
Loading