-
Notifications
You must be signed in to change notification settings - Fork 116
Description
I have a react typescript webapp which uses react router @6.22.3
The router is build in the following way
const routes: RouteObject[] = [
{
path: "detailedView",
children: [
{
path: "somePath",
element: <SomeComponent />,
},
{
path: "detailedView",
children: [
{
path: Blockchain.ARBITRUM,
element: <ImportantComponent />,
},
],
},
],
},
];
The App.tsx looks like this
const App: React.FC = () => {
const content = useRoutes(router);
return (
{content}
);
};
Then deep inside of the ImportantComponent at some point I use LiFi widget which is shown when the user clicks on a Button (before that there are some popups which tell the user that the widget comes from LiFi and is not mine
<Dialog
open={open}
onClose={handleClose}
disableScrollLock={disableScrollLock}
>
<LiFiWidget
config={config}
integrator="integrator-string"
fee={0.0075}
/>
</Dialog>
On the localhost, everything works fine, I can use the widget and trade, etc.
If I publish the website on Netlify, it also works fine (let's call that a "staging" phase)
Actual bug
Then, when I publish it on my production (which is hosted on Cloudflare) I run into a problem. When interacting with the LiFi widget, every click redirects the user to a respective path (ON MY PAGE!!!). So for example, clicking on "From"
the user is taken to the path /from-token
When clicking on settings, the user is taken to the path /settings
I have no idea how to approach the troubleshooting of this, so I'd appreciate any help/input.
