@@ -125,6 +125,34 @@ the items from APIs by importing the module `react-admin-loopback4-adapted` and
125125the ` lb4Provider` that takes as a @param the url to the backend server ` http://localhost:3001` :
126126` ` ` ruby
127127const dataProvider = lb4Provider('http://localhost:3001');
128+ ` ` `
129+ ** This is the content of app.js**
130+
131+ ` ` ` ruby
132+ import * as React from 'react';
133+ import { Admin, Resource } from 'react-admin'
134+ import PostIcon from '@material-ui/icons/Book'
135+ import './App.css';
136+
137+ import Dashboard from './dashboard'
138+ import { ProductList, ProductCreate, Productedit } from './productlist'
139+ import { Userlist, Useredit, Usercreate } from './user'
140+
141+ import lb4Provider from 'react-admin-loopback4-adapted'
142+
143+ const dataProvider = lb4Provider('http://localhost:3001');
144+
145+ const App = () => (
146+ <Admin dataProvider={dataProvider} dashboard={Dashboard}>
147+ <Resource name="products" list={ProductList} create={ProductCreate}
148+ edit={Productedit} icon={PostIcon} />
149+ <Resource name="users" list={Userlist} edit={Useredit}
150+ create={Usercreate} />
151+ </Admin>
152+ )
153+ export default App;
154+
155+
128156` ` `
129157
130158** note** In this sample the authentication is not integrated we will complete it in the next tutorial
@@ -138,6 +166,8 @@ const dataProvider = lb4Provider('http://localhost:3001');
138166Site : https://planetconectus.com
139167
140168E-mail : mohamedali.chaabani@planetconectus.com
169+
170+ Phone : 00216 26 410 947
141171Phone : +33 970 440 431
142172` ` ` `
143173
0 commit comments