Advertisement
megg123

html

Dec 13th, 2022
274
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
HTML 5 1.83 KB | None | 0 0
  1. <div className="form-container">
  2.           <div className="ui stackable">
  3.             <div className="row">
  4.               <Form
  5.                onSubmit={onSubmit}
  6.                noValidate
  7.                className={loading ? "loading" : ""}
  8.              >
  9.                 <h1>Log In</h1>
  10.                 <Form.Input
  11.                  label="Username"
  12.                  placeholder="Username.."
  13.                  name="username"
  14.                  type="text"
  15.                  value={values.username}
  16.                  error={errors.username ? true : false}
  17.                  onChange={onChange}
  18.                />
  19.                 <Form.Input
  20.                  label="Password"
  21.                  placeholder="Password.."
  22.                  name="password"
  23.                  type="password"
  24.                  value={values.password}
  25.                  error={errors.password ? true : false}
  26.                  onChange={onChange}
  27.                />
  28.                 <Button
  29.                  onClick={() => Redirect("/")}
  30.                   type="submit"
  31.                   id="login-btn"
  32.                   primary
  33.                 >
  34.                   Log In
  35.                 </Button>
  36.               </Form>
  37.               <Button
  38.                onClick={() => history.push("/register")}
  39.                 id="register-btn"
  40.                 primary
  41.               >
  42.                 Register
  43.               </Button>
  44.               {Object.keys(errors).length > 0 && (
  45.                <div className="ui error message">
  46.                  <ul className="list">
  47.                    {Object.values(errors).map((value) => (
  48.                      <li key={value}>{value}</li>
  49.                    ))}
  50.                  </ul>
  51.                </div>
  52.              )}
  53.            </div>
  54.          </div>
  55.        </div>
  56.      </div>
  57.  
  58.  
  59.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement