File tree Expand file tree Collapse file tree 2 files changed +13
-2
lines changed Expand file tree Collapse file tree 2 files changed +13
-2
lines changed Original file line number Diff line number Diff line change 1
- import React from 'react'
1
+ import React , { useEffect } from 'react'
2
2
// import { Route } from 'react-router-dom'
3
3
import PropTypes from 'prop-types'
4
+ import api from '../_api'
4
5
5
6
const Administration = ( { match } ) => {
7
+ useEffect ( ( ) => {
8
+ api . users . getList ( ) . then ( res => console . log ( 'res' , res ) )
9
+ } , [ ] )
10
+
6
11
return (
7
12
< div >
8
13
{ /* <Route path={`${match.path}/login` } component={Login} /> */ }
Original file line number Diff line number Diff line change 1
1
import instance from './client'
2
- // import mocks from './_mocks'
2
+ import mocks from './_mocks'
3
3
import organizations from './organizations'
4
4
import users from './users'
5
5
@@ -8,6 +8,12 @@ export interface ApiInitOptions {
8
8
}
9
9
10
10
const init = ( options : ApiInitOptions = { } ) => {
11
+ // const mockAdapter = options.useSampleData ? mocks.init(instance) : undefined
12
+
13
+ if ( options . useSampleData ) {
14
+ mocks . init ( instance )
15
+ }
16
+
11
17
return instance
12
18
}
13
19
You can’t perform that action at this time.
0 commit comments