Feature/admin login 1#5
Conversation
|
Right now this branch is pointing to In such cases, I suggest creating a PR pointing to the |
| import BackArrowImg from '../assets/back-arrow.svg' | ||
| import ShowPasswordImg from '../assets/show-password.svg' |
There was a problem hiding this comment.
Right now these imports give you paths to the image, not components, so I would recommend using the lower case (otherwise it's a little bit confusing).
Alternatively, you can use SVGO's feature, supported by the CRA, to import SVGs as real react components:
import { ReactComponent as Logo } from './logo.svg';
function App() {
return (
<div>
{/* Logo is an actual React component */}
<Logo />
</div>
);
}| <form className='password-form' onSubmit={authenticateUser}> | ||
| <div className='sign-in-container'> | ||
| <div className='password-textbox-container'> | ||
| <input className='textbox password-textbox' type={(showPassword) ? 'password' : 'text'} name='password' onChange={onPasswordChange} required/> |
There was a problem hiding this comment.
JFYI: when you have quite a few props (or just attributes) on the component, you could split it into multiple lines to improve readability (especially for PR's viewers, but also for developers in the code):
<input
className='textbox password-textbox'
type={(showPassword) ? 'password' : 'text'}
name='password'
onChange={onPasswordChange}
required
/>| ) | ||
| } | ||
|
|
||
| export default PasswordAvatar No newline at end of file |
There was a problem hiding this comment.
Btw, when you use default exports, do you get auto completes in your VSCode?
| } | ||
| } | ||
|
|
||
| function logUser(user) { |
There was a problem hiding this comment.
I would suggest using signUserIn as a name, instead of logUser.
Log by itself is the same log as in console.log - on the first view of the PR I didn't spot this and thought it some debug thing.

Add the layout for admin to enter a password.