MCPcopy
hub / github.com/graphile/starter / inner

Function inner

@app/client/src/pages/settings/security.tsx:126–224  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

124 );
125
126 const inner = () => {
127 if (loading) {
128 /* noop */
129 } else if (graphqlQueryError) {
130 return <ErrorAlert error={graphqlQueryError} />;
131 } else if (data && data.currentUser && !data.currentUser.hasPassword) {
132 return (
133 <div>
134 <PageHeader title="Change passphrase" />
135 <P>
136 You registered your account through social login, so you do not
137 currently have a passphrase. If you would like a passphrase, press
138 the button below to request a passphrase reset email to '{email}'
139 (you can choose a different email by making it primary in{" "}
140 <Link href="/settings/emails">email settings</Link>).
141 </P>
142 <Button onClick={handleResetPassword} disabled={resetInProgress}>
143 Reset passphrase
144 </Button>
145 </div>
146 );
147 }
148
149 const code = getCodeFromError(error);
150 return (
151 <div>
152 <PageHeader title="Change passphrase" />
153 <Form
154 {...formItemLayout}
155 form={form}
156 onFinish={handleSubmit}
157 onValuesChange={handleValuesChange}
158 >
159 <Form.Item
160 label="Old passphrase"
161 name="oldPassword"
162 rules={[
163 {
164 required: true,
165 message: "Please input your passphrase",
166 },
167 ]}
168 >
169 <Input type="password" />
170 </Form.Item>
171 <Form.Item label="New passphrase" required>
172 <Form.Item
173 noStyle
174 name="newPassword"
175 rules={[
176 {
177 required: true,
178 message: "Please confirm your passphrase",
179 },
180 ]}
181 >
182 <Input
183 type="password"

Callers 1

Settings_SecurityFunction · 0.85

Calls 2

getCodeFromErrorFunction · 0.90
extractErrorFunction · 0.90

Tested by

no test coverage detected