Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Demo] Fix preferences are shared between demos #9264

Merged
merged 2 commits into from
Sep 12, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 13 additions & 6 deletions examples/crm/src/App.tsx
Original file line number Diff line number Diff line change
@@ -1,17 +1,24 @@
import * as React from 'react';
import { Admin, Resource, ListGuesser, defaultTheme } from 'react-admin';
import { dataProvider } from './dataProvider';
import { authProvider } from './authProvider';
import {
Admin,
ListGuesser,
Resource,
defaultTheme,
localStorageStore,
} from 'react-admin';

import Layout from './Layout';
import contacts from './contacts';
import { authProvider } from './authProvider';
import companies from './companies';
import deals from './deals';
import contacts from './contacts';
import { Dashboard } from './dashboard/Dashboard';
import { dataProvider } from './dataProvider';
import deals from './deals';

const App = () => (
<Admin
dataProvider={dataProvider}
authProvider={authProvider}
store={localStorageStore(undefined, 'CRM')}
layout={Layout}
dashboard={Dashboard}
theme={{
Expand Down
17 changes: 8 additions & 9 deletions examples/demo/src/App.tsx
Original file line number Diff line number Diff line change
@@ -1,22 +1,20 @@
import * as React from 'react';
import { Admin, CustomRoutes, Resource } from 'react-admin';
import polyglotI18nProvider from 'ra-i18n-polyglot';
import { Admin, CustomRoutes, Resource, localStorageStore } from 'react-admin';
import { Route } from 'react-router';

import authProvider from './authProvider';
import { Login, Layout } from './layout';
import categories from './categories';
import { Dashboard } from './dashboard';
import dataProviderFactory from './dataProvider';
import englishMessages from './i18n/en';
import { lightTheme, darkTheme } from './layout/themes';

import visitors from './visitors';
import invoices from './invoices';
import { Layout, Login } from './layout';
import { darkTheme, lightTheme } from './layout/themes';
import orders from './orders';
import products from './products';
import invoices from './invoices';
import categories from './categories';
import reviews from './reviews';
import dataProviderFactory from './dataProvider';
import Segments from './segments/Segments';
import visitors from './visitors';

const i18nProvider = polyglotI18nProvider(
locale => {
Expand All @@ -40,6 +38,7 @@ const App = () => (
dataProvider={dataProviderFactory(
process.env.REACT_APP_DATA_PROVIDER || ''
)}
store={localStorageStore(undefined, 'ECommerce')}
authProvider={authProvider}
dashboard={Dashboard}
loginPage={Login}
Expand Down