removes old create user route, should rely on default interface for that
This commit is contained in:
@@ -8,7 +8,6 @@ import Dashboard from './views/Dashboard';
|
||||
import Login from './views/Login';
|
||||
import Logout from './views/Logout';
|
||||
import CreateFirstUser from './views/CreateFirstUser';
|
||||
import CreateUser from './views/CreateUser';
|
||||
import MediaLibrary from './views/MediaLibrary';
|
||||
import Edit from './views/collections/Edit';
|
||||
import List from './views/collections/List';
|
||||
@@ -63,11 +62,6 @@ const Routes = () => {
|
||||
path={`${match.url}/media-library`}
|
||||
component={MediaLibrary}
|
||||
/>
|
||||
<Route
|
||||
exact
|
||||
path={`${match.url}/create-user`}
|
||||
component={CreateUser}
|
||||
/>
|
||||
<Route
|
||||
path={`${match.url}/`}
|
||||
exact
|
||||
|
||||
@@ -132,7 +132,7 @@ Form.defaultProps = {
|
||||
ajax: true,
|
||||
method: 'POST',
|
||||
action: '',
|
||||
handleAjaxResponse: false,
|
||||
handleAjaxResponse: null,
|
||||
className: '',
|
||||
};
|
||||
|
||||
|
||||
@@ -1,50 +0,0 @@
|
||||
import React, { useEffect } from 'react';
|
||||
import ContentBlock from '../../layout/ContentBlock';
|
||||
import Form from '../../forms/Form';
|
||||
import Email from '../../forms/field-types/Email';
|
||||
import Password from '../../forms/field-types/Password';
|
||||
import FormSubmit from '../../forms/Submit';
|
||||
import { useStepNav } from '../../modules/StepNav';
|
||||
|
||||
import './index.scss';
|
||||
|
||||
const CreateUser = () => {
|
||||
const { setStepNav } = useStepNav();
|
||||
|
||||
useEffect(() => {
|
||||
setStepNav([
|
||||
{
|
||||
label: 'Create User',
|
||||
},
|
||||
]);
|
||||
}, []);
|
||||
|
||||
return (
|
||||
<ContentBlock
|
||||
className="create-user"
|
||||
align="left"
|
||||
width="narrow"
|
||||
>
|
||||
<h1>Create New User</h1>
|
||||
<Form
|
||||
method="POST"
|
||||
action="http://localhost:3000/users"
|
||||
>
|
||||
<Email
|
||||
label="Email Address"
|
||||
name="email"
|
||||
required
|
||||
/>
|
||||
<Password
|
||||
error="password"
|
||||
label="Password"
|
||||
name="password"
|
||||
required
|
||||
/>
|
||||
<FormSubmit>Create</FormSubmit>
|
||||
</Form>
|
||||
</ContentBlock>
|
||||
);
|
||||
};
|
||||
|
||||
export default CreateUser;
|
||||
@@ -22,8 +22,6 @@ const Dashboard = () => {
|
||||
<h1>Dashboard</h1>
|
||||
<Link to={`${admin}/login`}>Login</Link>
|
||||
<br />
|
||||
<Link to={`${admin}/create-user`}>Create User</Link>
|
||||
<br />
|
||||
<Link to={`${admin}/collections/pages`}>Pages List</Link>
|
||||
<br />
|
||||
<Link to={`${admin}/collections/pages/test123`}>Edit Page</Link>
|
||||
|
||||
@@ -17,7 +17,7 @@ const {
|
||||
} = getSanitizedConfig();
|
||||
|
||||
const Logout = () => {
|
||||
const token = cookies.remove('token');
|
||||
cookies.remove('token', { path: '/' });
|
||||
|
||||
return (
|
||||
<ContentBlock
|
||||
|
||||
Reference in New Issue
Block a user