Skip to content

Commit

Permalink
Merge pull request #126 from Zextras/fix-modals-providers
Browse files Browse the repository at this point in the history
fix: providing modal manager and snackbar manager to shell routes
nubsthead authored Sep 7, 2022
2 parents 85fe7b0 + 46be7f6 commit 7dfc1df
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/boot/app/app-context-provider.tsx
Original file line number Diff line number Diff line change
@@ -6,14 +6,19 @@

import React, { FC } from 'react';
import { I18nextProvider } from 'react-i18next';
import { ModalManager, SnackbarManager } from '@zextras/carbonio-design-system';
import AppErrorCatcher from './app-error-catcher';
import { useI18n } from '../../store/i18n';

const AppContextProvider: FC<{ pkg: string }> = ({ pkg, children }) => {
const i18n = useI18n(pkg)();
return (
<I18nextProvider i18n={i18n}>
<AppErrorCatcher>{children}</AppErrorCatcher>
<ModalManager>
<SnackbarManager>
<AppErrorCatcher>{children}</AppErrorCatcher>
</SnackbarManager>
</ModalManager>
</I18nextProvider>
);
};

0 comments on commit 7dfc1df

Please sign in to comment.