|
| 1 | +import React, { useState } from 'react'; |
| 2 | +import { useSelector, useDispatch } from 'react-redux'; |
| 3 | +import { |
| 4 | + increment, |
| 5 | + incrementAsync, |
| 6 | + selectCount, |
| 7 | +} from '../authSlice'; |
| 8 | +import { Link } from 'react-router-dom'; |
| 9 | + |
| 10 | +export default function Signup() { |
| 11 | + const count = useSelector(selectCount); |
| 12 | + const dispatch = useDispatch(); |
| 13 | + |
| 14 | + |
| 15 | + return ( |
| 16 | + <> |
| 17 | + |
| 18 | + <div className="flex min-h-full flex-1 flex-col justify-center px-6 py-12 lg:px-8"> |
| 19 | + <div className="sm:mx-auto sm:w-full sm:max-w-sm"> |
| 20 | + <img |
| 21 | + className="mx-auto h-10 w-auto" |
| 22 | + src="https://tailwindui.com/img/logos/mark.svg?color=indigo&shade=600" |
| 23 | + alt="Your Company" |
| 24 | + /> |
| 25 | + <h2 className="mt-10 text-center text-2xl font-bold leading-9 tracking-tight text-gray-900"> |
| 26 | + Create a New Account |
| 27 | + </h2> |
| 28 | + </div> |
| 29 | + |
| 30 | + <div className="mt-10 sm:mx-auto sm:w-full sm:max-w-sm"> |
| 31 | + <form className="space-y-6" action="#" method="POST"> |
| 32 | + <div> |
| 33 | + <label htmlFor="email" className="block text-sm font-medium leading-6 text-gray-900"> |
| 34 | + Email address |
| 35 | + </label> |
| 36 | + <div className="mt-2"> |
| 37 | + <input |
| 38 | + id="email" |
| 39 | + name="email" |
| 40 | + type="email" |
| 41 | + autoComplete="email" |
| 42 | + required |
| 43 | + className="block w-full rounded-md border-0 py-1.5 text-gray-900 shadow-sm ring-1 ring-inset ring-gray-300 placeholder:text-gray-400 focus:ring-2 focus:ring-inset focus:ring-indigo-600 sm:text-sm sm:leading-6" |
| 44 | + /> |
| 45 | + </div> |
| 46 | + </div> |
| 47 | + |
| 48 | + <div> |
| 49 | + <div className="flex items-center justify-between"> |
| 50 | + <label htmlFor="password" className="block text-sm font-medium leading-6 text-gray-900"> |
| 51 | + Password |
| 52 | + </label> |
| 53 | + <div className="text-sm"> |
| 54 | + <a href="#" className="font-semibold text-indigo-600 hover:text-indigo-500"> |
| 55 | + Forgot password? |
| 56 | + </a> |
| 57 | + </div> |
| 58 | + </div> |
| 59 | + <div className="mt-2"> |
| 60 | + <input |
| 61 | + id="password" |
| 62 | + name="password" |
| 63 | + type="password" |
| 64 | + autoComplete="current-password" |
| 65 | + required |
| 66 | + className="block w-full rounded-md border-0 py-1.5 text-gray-900 shadow-sm ring-1 ring-inset ring-gray-300 placeholder:text-gray-400 focus:ring-2 focus:ring-inset focus:ring-indigo-600 sm:text-sm sm:leading-6" |
| 67 | + /> |
| 68 | + </div> |
| 69 | + </div> |
| 70 | + |
| 71 | + <div> |
| 72 | + <div className="flex items-center justify-between"> |
| 73 | + <label htmlFor="password" className="block text-sm font-medium leading-6 text-gray-900"> |
| 74 | + Confirm Password |
| 75 | + </label> |
| 76 | + |
| 77 | + </div> |
| 78 | + <div className="mt-2"> |
| 79 | + <input |
| 80 | + id="confirm-password" |
| 81 | + name="confirm-password" |
| 82 | + type="password" |
| 83 | + required |
| 84 | + className="block w-full rounded-md border-0 py-1.5 text-gray-900 shadow-sm ring-1 ring-inset ring-gray-300 placeholder:text-gray-400 focus:ring-2 focus:ring-inset focus:ring-indigo-600 sm:text-sm sm:leading-6" |
| 85 | + /> |
| 86 | + </div> |
| 87 | + </div> |
| 88 | + |
| 89 | + <div> |
| 90 | + <button |
| 91 | + type="submit" |
| 92 | + className="flex w-full justify-center rounded-md bg-indigo-600 px-3 py-1.5 text-sm font-semibold leading-6 text-white shadow-sm hover:bg-indigo-500 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-indigo-600" |
| 93 | + > |
| 94 | + Sign Up |
| 95 | + </button> |
| 96 | + </div> |
| 97 | + </form> |
| 98 | + |
| 99 | + <p className="mt-10 text-center text-sm text-gray-500"> |
| 100 | + Already a Member?{' '} |
| 101 | + <Link to="/login" className="font-semibold leading-6 text-indigo-600 hover:text-indigo-500"> |
| 102 | + Log In |
| 103 | + </Link> |
| 104 | + </p> |
| 105 | + </div> |
| 106 | + </div> |
| 107 | + </> |
| 108 | + ); |
| 109 | +} |
0 commit comments