mirror of
https://github.com/Unleash/unleash.git
synced 2025-01-25 00:07:47 +01:00
refactor: move plausible context on top of feedback (#5824)
We were unable to send plausible events from feedback. Now we can.
This commit is contained in:
parent
17fe264632
commit
d770f624e6
@ -9,7 +9,6 @@ import Loader from 'component/common/Loader/Loader';
|
||||
import NotFound from 'component/common/NotFound/NotFound';
|
||||
import { ProtectedRoute } from 'component/common/ProtectedRoute/ProtectedRoute';
|
||||
import { SWRProvider } from 'component/providers/SWRProvider/SWRProvider';
|
||||
import { PlausibleProvider } from 'component/providers/PlausibleProvider/PlausibleProvider';
|
||||
import ToastRenderer from 'component/common/ToastRenderer/ToastRenderer';
|
||||
import { routes } from 'component/menu/routes';
|
||||
import { useAuthDetails } from 'hooks/api/getters/useAuth/useAuthDetails';
|
||||
@ -51,8 +50,6 @@ export const App = () => {
|
||||
}, [authDetails, user]);
|
||||
|
||||
return (
|
||||
<ErrorBoundary FallbackComponent={LayoutError}>
|
||||
<PlausibleProvider>
|
||||
<ErrorBoundary FallbackComponent={LayoutError}>
|
||||
<SWRProvider>
|
||||
<Suspense fallback={<Loader />}>
|
||||
@ -74,13 +71,10 @@ export const App = () => {
|
||||
<StyledContainer>
|
||||
<ToastRenderer />
|
||||
<Routes>
|
||||
{availableRoutes.map(
|
||||
(route) => (
|
||||
{availableRoutes.map((route) => (
|
||||
<Route
|
||||
key={route.path}
|
||||
path={
|
||||
route.path
|
||||
}
|
||||
path={route.path}
|
||||
element={
|
||||
<LayoutPicker
|
||||
isStandalone={
|
||||
@ -89,20 +83,15 @@ export const App = () => {
|
||||
}
|
||||
>
|
||||
<ProtectedRoute
|
||||
route={
|
||||
route
|
||||
}
|
||||
route={route}
|
||||
/>
|
||||
</LayoutPicker>
|
||||
}
|
||||
/>
|
||||
),
|
||||
)}
|
||||
))}
|
||||
<Route
|
||||
path='/'
|
||||
element={
|
||||
<InitialRedirect />
|
||||
}
|
||||
element={<InitialRedirect />}
|
||||
/>
|
||||
<Route
|
||||
path='*'
|
||||
@ -121,7 +110,5 @@ export const App = () => {
|
||||
</Suspense>
|
||||
</SWRProvider>
|
||||
</ErrorBoundary>
|
||||
</PlausibleProvider>
|
||||
</ErrorBoundary>
|
||||
);
|
||||
};
|
||||
|
@ -16,7 +16,10 @@ import { AnnouncerProvider } from 'component/common/Announcer/AnnouncerProvider/
|
||||
import { InstanceStatus } from 'component/common/InstanceStatus/InstanceStatus';
|
||||
import { UIProviderContainer } from 'component/providers/UIProvider/UIProviderContainer';
|
||||
import { StickyProvider } from 'component/common/Sticky/StickyProvider';
|
||||
import { FeedbackProvider } from './component/feedbackNew/FeedbackProvider';
|
||||
import { FeedbackProvider } from 'component/feedbackNew/FeedbackProvider';
|
||||
import { PlausibleProvider } from 'component/providers/PlausibleProvider/PlausibleProvider';
|
||||
import { Error as LayoutError } from './component/layout/Error/Error';
|
||||
import { ErrorBoundary } from 'react-error-boundary';
|
||||
|
||||
window.global ||= window;
|
||||
|
||||
@ -27,6 +30,8 @@ ReactDOM.render(
|
||||
<QueryParamProvider adapter={ReactRouter6Adapter}>
|
||||
<ThemeProvider>
|
||||
<AnnouncerProvider>
|
||||
<ErrorBoundary FallbackComponent={LayoutError}>
|
||||
<PlausibleProvider>
|
||||
<FeedbackProvider>
|
||||
<FeedbackCESProvider>
|
||||
<StickyProvider>
|
||||
@ -37,6 +42,8 @@ ReactDOM.render(
|
||||
</StickyProvider>
|
||||
</FeedbackCESProvider>
|
||||
</FeedbackProvider>
|
||||
</PlausibleProvider>
|
||||
</ErrorBoundary>
|
||||
</AnnouncerProvider>
|
||||
</ThemeProvider>
|
||||
</QueryParamProvider>
|
||||
|
Loading…
Reference in New Issue
Block a user