Skip to content

Commit

Permalink
fix: QueryParamProvider error on backend rendered views
Browse files Browse the repository at this point in the history
  • Loading branch information
michael-s-molina committed Apr 3, 2023
1 parent cdc7af1 commit 5d43f86
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions superset-frontend/src/views/menu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,16 @@
// Menu App. Used in views that do not already include the Menu component in the layout.
// eg, backend rendered views
import React from 'react';
import { Provider } from 'react-redux';
import ReactDOM from 'react-dom';
import { Route, BrowserRouter } from 'react-router-dom';
import { CacheProvider } from '@emotion/react';
import { QueryParamProvider } from 'use-query-params';
import createCache from '@emotion/cache';
import { ThemeProvider } from '@superset-ui/core';
import Menu from 'src/views/components/Menu';
import { theme } from 'src/preamble';
import getBootstrapData from 'src/utils/getBootstrapData';

import { Provider } from 'react-redux';
import { setupStore } from './store';

// Disable connecting to redux debugger so that the React app injected
Expand All @@ -46,7 +47,14 @@ const app = (
<CacheProvider value={emotionCache}>
<ThemeProvider theme={theme}>
<Provider store={store}>
<Menu data={menu} />
<BrowserRouter>
<QueryParamProvider
ReactRouterRoute={Route}
stringifyOptions={{ encode: false }}
>
<Menu data={menu} />
</QueryParamProvider>
</BrowserRouter>
</Provider>
</ThemeProvider>
</CacheProvider>
Expand Down

0 comments on commit 5d43f86

Please sign in to comment.