add crud api
This commit is contained in:
4
src/pages/users/api/UsersAPI.ts
Normal file
4
src/pages/users/api/UsersAPI.ts
Normal file
@ -0,0 +1,4 @@
|
||||
import {ENDPOINT} from '_consts/common';
|
||||
import {CrudAPI} from '../../../core/api/CrudAPI';
|
||||
|
||||
export const usersAPI = new CrudAPI(ENDPOINT.USERS);
|
||||
12
src/pages/users/components/page/Page.tsx
Normal file
12
src/pages/users/components/page/Page.tsx
Normal file
@ -0,0 +1,12 @@
|
||||
import React, {FC, memo} from 'react';
|
||||
import {usersAPI} from '../../api/UsersAPI';
|
||||
|
||||
usersAPI.request();
|
||||
|
||||
const Page: FC = () => {
|
||||
return (
|
||||
<div>users</div>
|
||||
);
|
||||
};
|
||||
|
||||
export default memo(Page);
|
||||
1
src/pages/users/components/page/index.ts
Normal file
1
src/pages/users/components/page/index.ts
Normal file
@ -0,0 +1 @@
|
||||
export {default} from './Page';
|
||||
8
src/pages/users/routing.tsx
Normal file
8
src/pages/users/routing.tsx
Normal file
@ -0,0 +1,8 @@
|
||||
import React from 'react';
|
||||
import {Route} from 'react-router-dom';
|
||||
import {ROUTES} from '_consts/common';
|
||||
import Page from './components/page';
|
||||
|
||||
export default (
|
||||
<Route component={Page} path={ROUTES.USERS} exact />
|
||||
);
|
||||
Reference in New Issue
Block a user