mirror of
https://github.com/apache/superset.git
synced 2026-05-29 20:29:34 +00:00
chore: Upgrade to React 18 (#38563)
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com> Co-authored-by: Evan Rusackas <evan@preset.io>
This commit is contained in:
committed by
GitHub
parent
28239c18d4
commit
41a22d7918
@@ -59,7 +59,9 @@ export const getThemeController = (): ThemeController => themeController;
|
||||
|
||||
const extensionsRegistry = getExtensionsRegistry();
|
||||
|
||||
export const EmbeddedContextProviders: React.FC = ({ children }) => {
|
||||
export const EmbeddedContextProviders: React.FC<{
|
||||
children?: React.ReactNode;
|
||||
}> = ({ children }) => {
|
||||
const RootContextProviderExtension = extensionsRegistry.get(
|
||||
'root.context.provider',
|
||||
);
|
||||
@@ -67,6 +69,7 @@ export const EmbeddedContextProviders: React.FC = ({ children }) => {
|
||||
return (
|
||||
<SupersetThemeProvider themeController={themeController}>
|
||||
<ReduxProvider store={store}>
|
||||
{/* @ts-expect-error react-dnd types not updated for React 18 */}
|
||||
<DndProvider backend={HTML5Backend}>
|
||||
<EmbeddedUiConfigProvider>
|
||||
<DynamicPluginProvider>
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
import 'src/public-path';
|
||||
|
||||
import { lazy, Suspense } from 'react';
|
||||
import ReactDOM from 'react-dom';
|
||||
import { createRoot } from 'react-dom/client';
|
||||
import { BrowserRouter as Router, Route } from 'react-router-dom';
|
||||
import { Global } from '@emotion/react';
|
||||
import { t } from '@apache-superset/core/translation';
|
||||
@@ -189,7 +189,7 @@ function start() {
|
||||
type: USER_LOADED,
|
||||
user: result,
|
||||
});
|
||||
ReactDOM.render(<EmbeddedApp />, appMountPoint);
|
||||
createRoot(appMountPoint).render(<EmbeddedApp />);
|
||||
},
|
||||
err => {
|
||||
// something is most likely wrong with the guest token
|
||||
|
||||
Reference in New Issue
Block a user