fix(frontend): Strip confirmPassword before API calls; add pointer cursor
- Destructure confirmPassword out of form values in SetupPage and InviteCompletePage so it is never sent to the backend - Add global cursor:pointer rule for buttons, selects, labels and links Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -110,6 +110,10 @@
|
|||||||
-moz-osx-font-smoothing: grayscale;
|
-moz-osx-font-smoothing: grayscale;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
button, [role="button"], select, label[for], a[href], [tabindex]:not([tabindex="-1"]) {
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
|
||||||
/* Visible focus ring for keyboard navigation (NFR-U1-02 / Q2-A). */
|
/* Visible focus ring for keyboard navigation (NFR-U1-02 / Q2-A). */
|
||||||
:focus-visible {
|
:focus-visible {
|
||||||
outline: 2px solid var(--color-ring);
|
outline: 2px solid var(--color-ring);
|
||||||
|
|||||||
@@ -68,10 +68,8 @@ export function InviteCompletePage() {
|
|||||||
setLoadingState('error');
|
setLoadingState('error');
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
await completeMutation.mutateAsync({
|
const { confirmPassword: _, ...fields } = values;
|
||||||
token,
|
await completeMutation.mutateAsync({ token, ...fields });
|
||||||
...values
|
|
||||||
});
|
|
||||||
setLoadingState('success');
|
setLoadingState('success');
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
navigate({ to: '/login' });
|
navigate({ to: '/login' });
|
||||||
|
|||||||
@@ -45,7 +45,8 @@ export function SetupPage() {
|
|||||||
const onSubmit = handleSubmit(async (values) => {
|
const onSubmit = handleSubmit(async (values) => {
|
||||||
setServerError(null);
|
setServerError(null);
|
||||||
try {
|
try {
|
||||||
await setupMutation.mutateAsync(values);
|
const { confirmPassword: _, ...payload } = values;
|
||||||
|
await setupMutation.mutateAsync(payload);
|
||||||
setSuccessMessage(true);
|
setSuccessMessage(true);
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
navigate({ to: '/login' });
|
navigate({ to: '/login' });
|
||||||
|
|||||||
Reference in New Issue
Block a user