MCPcopy Create free account
hub / github.com/OpenSIST/OpenSIST.github.io / EmailSuffixField

Function EmailSuffixField

src/Components/Auth/AuthShared.jsx:64–93  ·  view source on GitHub ↗
({value, onChange, suffix, onSuffixChange})

Source from the content-addressed store, hash-verified

62const SUFFIXES = ['@shanghaitech.edu.cn', '@alumni.shanghaitech.edu.cn'];
63
64export function EmailSuffixField({value, onChange, suffix, onSuffixChange}) {
65 return (
66 <>
67 <TextField
68 fullWidth
69 size='small'
70 variant='outlined'
71 label='上科大邮箱'
72 id='username'
73 name='username'
74 value={value}
75 onChange={onChange}
76 required
77 />
78 <TextField
79 select
80 fullWidth
81 size='small'
82 variant='outlined'
83 label='邮箱后缀'
84 id='suffix'
85 name='suffix'
86 value={suffix}
87 onChange={onSuffixChange}
88 >
89 {SUFFIXES.map((s) => <MenuItem key={s} value={s}>{s}</MenuItem>)}
90 </TextField>
91 </>
92 );
93}
94
95export function PasswordField({label, ...props}) {
96 const [show, setShow] = useState(false);

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected