Commit d45ea414 authored by Nawasan Wisitsingkhon's avatar Nawasan Wisitsingkhon

change password input in register page

parent fd48aa3d
import userCookie from "@/components/lib/user";
import { Box, FormControl, InputLabel, Input, InputAdornment, Button, Grid, TextField, Toolbar } from "@mui/material";
import { IconButton } from "@mui/material";
import { Visibility, VisibilityOff } from "@mui/icons-material";
import { Box, Button, Grid, TextField } from "@mui/material";
import React from "react";
import { useContext } from "react";
import { UserContext } from "./_app";
......@@ -9,11 +6,7 @@ import { Container } from "@mui/material";
export default function Login() {
const user = useContext(UserContext);
const [showPassword, setShowPassword] = React.useState(false);
const handleMouseDownPassword = (event) => {
event.preventDefault();
};
const handleClickShowPassword = () => setShowPassword((show) => !show);
if (user.value?.name)
return (
<div>
......@@ -43,25 +36,7 @@ export default function Login() {
<TextField label="รูปภาพ" helperText={"https://someweb.com/image.jpg"} variant="standard" className="mx-3 my-1" />
<TextField label="username" variant="standard" className="mx-3 my-1" />
<TextField label="password" type="password" variant="standard" className="mx-3 my-1" />
<FormControl sx={{ m: 1, width: '25ch' }} variant="standard">
<InputLabel htmlFor="standard-adornment-password">Password</InputLabel>
<Input
id="standard-adornment-password"
type={showPassword ? 'text' : 'password'}
endAdornment={
<InputAdornment position="end">
<IconButton
aria-label="toggle password visibility"
onClick={handleClickShowPassword}
onMouseDown={handleMouseDownPassword}
>
{showPassword ? <VisibilityOff /> : <Visibility />}
</IconButton>
</InputAdornment>
}
/>
</FormControl>
<div className="text-right px-10 sm:px-16">
<div className="text-right px-10 sm:px-16">
<Button className="my-5 text-lg" variant="contained" type="submit">สมัคร</Button>
</div>
</form>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment