Skip to content

Commit dee94b6

Browse files
committed
doing AddProject instead of AddUser
1 parent 4cb2542 commit dee94b6

File tree

3 files changed

+6
-16
lines changed

3 files changed

+6
-16
lines changed

src/projects/authentication/AddUser.js renamed to src/projects/AddProject.js

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import React, { useState } from 'react'
22
import { Prompt } from 'react-router-dom'
33
import Card from '../../ui/Card'
44

5-
const AddUser = () => {
5+
const AddProject = () => {
66
const [formIsDirty, setFormIsDirty] = useState(false)
77

88
function handleSubmit(e) {
@@ -14,14 +14,13 @@ const AddUser = () => {
1414
<Card style={{ minHeight: '20em' }}>
1515
<Prompt when={formIsDirty} message="Are you sure you want to leave this form before saving?" />
1616
<form className="spacing" onSubmit={handleSubmit}>
17-
<input onChange={() => setFormIsDirty(true)} type="text" placeholder="Email" required />
18-
<input onChange={() => setFormIsDirty(true)} type="password" placeholder="Password" required />
17+
<input onChange={() => setFormIsDirty(true)} type="text" placeholder="Project Name" required />
1918
<button type="submit" className="button">
20-
Add User
19+
Add Project
2120
</button>
2221
</form>
2322
</Card>
2423
)
2524
}
2625

27-
export default AddUser
26+
export default AddProject

src/projects/authentication/AuthenticationLayout.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ import Panel from '../../ui/Panel'
44
import PageHeader from '../../ui/PageHeader'
55
import { PageHeaderTabs, Tab } from '../../ui/PageHeaderTabs'
66
import Users from './Users'
7-
import AddUser from './AddUser'
87
import SigninMethods from './SigninMethods'
98
import Templates from './Templates'
109

@@ -20,7 +19,6 @@ const AuthenticationLayout = ({ match }) => {
2019
</PageHeader>
2120
<Panel>
2221
<Switch>
23-
<Route path={`${match.path}/users/add-user`} component={AddUser} />
2422
<Route path={`${match.path}/users`} component={Users} />
2523
<Route path={`${match.path}/signin-method`} component={SigninMethods} />
2624
<Route path={`${match.path}/templates`} component={Templates} />

src/projects/authentication/Users.js

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,8 @@
11
import React from 'react'
2-
import { Link } from 'react-router-dom'
32
import Card from '../../ui/Card'
43

5-
const Users = ({ match }) => {
6-
return (
7-
<Card style={{ height: '20em' }}>
8-
<Link to={`${match.url}/add-user`} className="button">
9-
Add User
10-
</Link>
11-
</Card>
12-
)
4+
const Users = () => {
5+
return <Card style={{ height: '20em' }}>Useres</Card>
136
}
147

158
export default Users

0 commit comments

Comments
 (0)