forked from b00tc4mp/isdi-bootcamp-202409
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
32 additions
and
36 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,6 @@ | ||
import './Field.css' | ||
|
||
function Field({ children }) { | ||
export default ({ children }) => { | ||
return <div className="Field">{children}</div> | ||
} | ||
|
||
export default Field |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
import './Input.css' | ||
|
||
export default ({ type, id }) => { | ||
export default ({ type, id, placeholder }) => { | ||
// console.log('Input -> render') | ||
|
||
return <input type={type} id={id} className="Input" /> | ||
return <input type={type} id={id} className="Input" placeholder={placeholder} /> | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
.showpass:hover{ | ||
text-decoration: underline; | ||
} | ||
.showpass{ | ||
font-size: 13px; | ||
} | ||
|
||
.Input{ | ||
border-right: 0px; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1 @@ | ||
import { validate } from './helpers' | ||
|
||
import uuid from '../data/uuid' | ||
|
||
export default (name, email, username, password, passwordRepeat) => { | ||
validate.name(name) | ||
validate.email(email) | ||
validate.username(username) | ||
validate.password(password) | ||
validate.passwordsMatch(password, passwordRepeat) | ||
|
||
const users = JSON.parse(localStorage.users) | ||
|
||
let user = users.find(user => user.username === username || user.email === email) | ||
|
||
if (user !== undefined) | ||
throw new Error('user already exists') | ||
|
||
user = { id: uuid(), name: name, email: email, username: username, password: password } | ||
|
||
users.push(user) | ||
|
||
localStorage.users = JSON.stringify(users) | ||
} | ||
export default () => delete sessionStorage.userId |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters