Skip to content

Commit

Permalink
fix(core): move ToastProvider inside LocaleProvider
Browse files Browse the repository at this point in the history
  • Loading branch information
juice49 committed Mar 28, 2024
1 parent 27643c8 commit cbce8c6
Showing 1 changed file with 29 additions and 29 deletions.
58 changes: 29 additions & 29 deletions packages/sanity/src/core/studio/StudioProvider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -58,42 +58,42 @@ export function StudioProvider({
<WorkspaceLoader LoadingComponent={LoadingBlock} ConfigErrorsComponent={ConfigErrorsScreen}>
<StudioTelemetryProvider config={config}>
<LocaleProvider>
<ResourceCacheProvider>{children}</ResourceCacheProvider>
<ToastProvider paddingY={7} zOffset={Z_OFFSET.toast}>
<ErrorLogger />
<ResourceCacheProvider>{children}</ResourceCacheProvider>
</ToastProvider>
</LocaleProvider>
</StudioTelemetryProvider>
</WorkspaceLoader>
)

return (
<ColorSchemeProvider onSchemeChange={onSchemeChange} scheme={scheme}>
<ToastProvider paddingY={7} zOffset={Z_OFFSET.toast}>
<ErrorLogger />
<StudioErrorBoundary>
<WorkspacesProvider config={config} basePath={basePath}>
<ActiveWorkspaceMatcher
unstable_history={history}
NotFoundComponent={NotFoundScreen}
LoadingComponent={LoadingBlock}
>
<StudioThemeProvider>
<UserColorManagerProvider>
{noAuthBoundary ? (
_children
) : (
<AuthBoundary
LoadingComponent={LoadingBlock}
AuthenticateComponent={AuthenticateScreen}
NotAuthenticatedComponent={NotAuthenticatedScreen}
>
{_children}
</AuthBoundary>
)}
</UserColorManagerProvider>
</StudioThemeProvider>
</ActiveWorkspaceMatcher>
</WorkspacesProvider>
</StudioErrorBoundary>
</ToastProvider>
<StudioErrorBoundary>
<WorkspacesProvider config={config} basePath={basePath}>
<ActiveWorkspaceMatcher
unstable_history={history}
NotFoundComponent={NotFoundScreen}
LoadingComponent={LoadingBlock}
>
<StudioThemeProvider>
<UserColorManagerProvider>
{noAuthBoundary ? (
_children
) : (
<AuthBoundary
LoadingComponent={LoadingBlock}
AuthenticateComponent={AuthenticateScreen}
NotAuthenticatedComponent={NotAuthenticatedScreen}
>
{_children}
</AuthBoundary>
)}
</UserColorManagerProvider>
</StudioThemeProvider>
</ActiveWorkspaceMatcher>
</WorkspacesProvider>
</StudioErrorBoundary>
</ColorSchemeProvider>
)
}

0 comments on commit cbce8c6

Please sign in to comment.