Skip to content

Commit

Permalink
fix: themes provider deprecations
Browse files Browse the repository at this point in the history
  • Loading branch information
dunglas committed Mar 6, 2024
1 parent 2eb9f9b commit b3669b3
Showing 1 changed file with 12 additions and 5 deletions.
17 changes: 12 additions & 5 deletions src/AdminGuesser.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import {
I18nContextProvider,
Loading,
ThemeProvider,
ThemesContext,
defaultI18nProvider,
} from 'react-admin';
import { createHashHistory, createMemoryHistory } from 'history';
Expand Down Expand Up @@ -231,11 +232,17 @@ const AdminGuesserWithError = ({

return (
<I18nContextProvider value={i18nProvider}>
<ThemeProvider theme={theme}>
<ErrorBoundary onError={handleError} fallbackRender={renderError}>
<AdminGuesser {...props} i18nProvider={i18nProvider} theme={theme} />
</ErrorBoundary>
</ThemeProvider>
<ThemesContext.Provider value={theme}>
<ThemeProvider>
<ErrorBoundary onError={handleError} fallbackRender={renderError}>
<AdminGuesser
{...props}
i18nProvider={i18nProvider}
theme={theme}
/>
</ErrorBoundary>
</ThemeProvider>
</ThemesContext.Provider>
</I18nContextProvider>
);
};
Expand Down

0 comments on commit b3669b3

Please sign in to comment.