Closed samepant closed 2 years ago
This turns out to be more complicated than expected because when we use the HashRouter instead of the BrowserRouter, the routes do not work as expected when it is opened as a Gnosis Safe app.
Everything behind the #
is ignored in the Gnosis Safe app (while it works as expected when opening the app directly) 🤔
Investigating...
Can probably be solved with some sort of escape or custom encoding of the #
character in the URL.
@juliopavila: It still seems to be a problem.
I think the solution might be using the HashRouter (like sam proposed), then finding some sort of escape or custom encoding of the # character in the URL (to use when the app is used as a Gnosis Safe app).
@juliopavila Fixed in commit https://github.com/gnosis/zodiac-modifier-roles/commit/214719caf31cdf9b4ec80021a7164932586dd09b.
Some samples of how to use it:
Gnosis Safe app linking: https://gnosis-safe.io/app/rin:0x5a30016bE71705326F8f1Fd0306D3Fbe5d215365/apps?appUrl=http://localhost:3000/%23/eth:0xE4E5237B3BE947FB99C491238cFEE3E5f190451F
- we use %23
URL-encode for #
Direct link: http://localhost:3000/#/eth:0xE4E5237B3BE947FB99C491238cFEE3E5f190451F
Right now, deep linking into the app is not possible as navigating to
https://roles.dev.gnosisguild.org/rin:0xE4E5237B3BE947FB99C491238cFEE3E5f190451F/roles/new
results in an ipfs gateway error:Using the HashRouter from react-router will solve this