fix: use harmony-ui toast and update gitignore to ignore .npmrc

This commit is contained in:
Sajad Mirjalili
2025-08-09 14:23:40 +03:30
parent 150848370a
commit 51eaa97cd0
5 changed files with 1663 additions and 9 deletions

View File

@@ -12,6 +12,7 @@ import { LanguageManager } from './components/LanguageManager';
function App() {
const { t } = useTranslation();
const showToast = useToast();
return (
<>
@@ -41,6 +42,9 @@ function App() {
</Alert>
</Box>
</div>
<Button onClick={() => showToast({ message: 'info toast' })}>
toast
</Button>
</>
);
}
@@ -48,6 +52,7 @@ function App() {
export default App;
import { Button } from '@mui/material';
import { useToast } from '@rkheftan/harmony-ui';
export const ThemeToggleButton = () => {
const { mode, setMode } = useColorScheme();

View File

@@ -3,6 +3,7 @@ import { I18nextProvider } from 'react-i18next';
import i18n from '@/config/i18n';
import { CustomThemeProvider } from './CustomThemeProvider';
import { RtlProvider } from './RtlProvider';
import { ToastProvider } from '@rkheftan/harmony-ui';
export const AppProviders: React.FC<{ children: React.ReactNode }> = ({
children,
@@ -10,7 +11,9 @@ export const AppProviders: React.FC<{ children: React.ReactNode }> = ({
return (
<I18nextProvider i18n={i18n}>
<RtlProvider>
<CustomThemeProvider>{children}</CustomThemeProvider>
<CustomThemeProvider>
<ToastProvider>{children}</ToastProvider>
</CustomThemeProvider>
</RtlProvider>
</I18nextProvider>
);