Skip to content

Commit

Permalink
fix comments from marmelab#8079
Browse files Browse the repository at this point in the history
  • Loading branch information
hiaselhans committed Sep 1, 2022
1 parent 610d2a5 commit dc0c4c1
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions docs/CustomRoutes.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,16 @@ Alternatively, you can add your custom routes to resources. They will be availab
import * as React from "react";
import { Admin, Resource, CustomRoutes } from 'react-admin';
import { Route } from "react-router-dom";
import posts, {PostAnalytics} from './posts';
import simpleRestProvider from 'ra-data-simple-rest';
import posts, { PostAnalytics } from './posts';
import comments from './comments';
import Settings from './Settings';
import Profile from './Profile';

const App = () => (
<Admin dataProvider={simpleRestProvider('http://path.to.my.api')}>
<Resource name="posts" {...posts}>
<Route path="analytics" element={<PostAnalytics/>}>
<Route path="analytics" element={<PostAnalytics/>} />
</Resource>
<Resource name="comments" {...comments} />
<CustomRoutes>
Expand Down Expand Up @@ -64,6 +65,7 @@ If you want a custom route to render without the layout (without the menu and th
// in src/App.js
import * as React from "react";
import { Admin, CustomRoutes } from 'react-admin';
import simpleRestProvider from 'ra-data-simple-rest';
import { Route } from "react-router-dom";
import Settings from './Settings';
import Register from './register';
Expand Down

0 comments on commit dc0c4c1

Please sign in to comment.