Skip to content

Commit

Permalink
Fix support for alternative data and auth providers
Browse files Browse the repository at this point in the history
  • Loading branch information
fzaninotto committed Aug 29, 2024
1 parent 79d657e commit 5a49414
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/root/CRM.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import {
localStorageStore,
mergeTranslations,
} from 'react-admin';
import type { AuthProvider, DataProvider } from 'react-admin';
import { deepmerge } from '@mui/utils';
import polyglotI18nProvider from 'ra-i18n-polyglot';
import englishMessages from 'ra-language-english';
Expand All @@ -25,7 +26,10 @@ import { Dashboard } from '../dashboard/Dashboard';
import deals from '../deals';
import { LoginPage } from '../login/LoginPage';
import { SignupPage } from '../login/SignupPage';
import { authProvider, dataProvider } from '../providers/supabase';
import {
authProvider as defaultAuthProvider,
dataProvider as defaultDataProvider,
} from '../providers/supabase';
import sales from '../sales';
import { SettingsPage } from '../settings/SettingsPage';
import {
Expand All @@ -46,6 +50,8 @@ import {

// Define the interface for the CRM component props
type CRMProps = {
dataProvider?: DataProvider;
authProvider?: AuthProvider;
lightTheme?: RaThemeOptions;
darkTheme?: RaThemeOptions;
} & Partial<ConfigurationContextValue>;
Expand Down Expand Up @@ -124,6 +130,8 @@ export const CRM = ({
noteStatuses = defaultNoteStatuses,
taskTypes = defaultTaskTypes,
title = defaultTitle,
dataProvider = defaultDataProvider,
authProvider = defaultAuthProvider,
}: CRMProps) => (
<ConfigurationProvider
contactGender={contactGender}
Expand Down

0 comments on commit 5a49414

Please sign in to comment.