mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-14 21:27:20 +00:00
chore: disable rules in oxlint (#9154)
This commit is contained in:
@@ -38,7 +38,11 @@ export function DataTableRowActions({ user }: DataTableRowActionsProps) {
|
||||
const { resetPasswordLink, onResetPassword } = useResetUserPassword();
|
||||
|
||||
const openResetPasswordDialog = useCallback(() => {
|
||||
onResetPassword(user.id, () => setResetPasswordDialogOpen(true));
|
||||
onResetPassword(user.id, () => setResetPasswordDialogOpen(true)).catch(
|
||||
e => {
|
||||
console.error(e);
|
||||
}
|
||||
);
|
||||
}, [onResetPassword, user.id]);
|
||||
|
||||
const handleCopy = useCallback(() => {
|
||||
|
||||
@@ -53,7 +53,7 @@ export const useCreateUser = () => {
|
||||
toast.error('Failed to update account: ' + (e as Error).message);
|
||||
}
|
||||
},
|
||||
[createAccount, revalidate]
|
||||
[createAccount, revalidate, updateAccountFeatures]
|
||||
);
|
||||
|
||||
return { creating: creating || !!error, create };
|
||||
@@ -99,7 +99,7 @@ export const useUpdateUser = () => {
|
||||
toast.error('Failed to update account: ' + (e as Error).message);
|
||||
}
|
||||
},
|
||||
[revalidate, updateAccount]
|
||||
[revalidate, updateAccount, updateAccountFeatures]
|
||||
);
|
||||
|
||||
return { updating: updating || !!error, update };
|
||||
|
||||
@@ -26,7 +26,7 @@ export function UserDropdown() {
|
||||
fetch('/api/auth/sign-out')
|
||||
.then(() => {
|
||||
toast.success('Logged out successfully');
|
||||
relative();
|
||||
return relative();
|
||||
})
|
||||
.catch(err => {
|
||||
toast.error(`Failed to logout: ${err.message}`);
|
||||
|
||||
@@ -6,6 +6,7 @@ import {
|
||||
CarouselItem,
|
||||
} from '@affine/admin/components/ui/carousel';
|
||||
import { validateEmailAndPassword } from '@affine/admin/utils';
|
||||
import { useAsyncCallback } from '@affine/core/components/hooks/affine-async-hooks';
|
||||
import { useCallback, useEffect, useState } from 'react';
|
||||
import { useNavigate } from 'react-router-dom';
|
||||
import { toast } from 'sonner';
|
||||
@@ -120,7 +121,7 @@ export const Form = () => {
|
||||
}
|
||||
}, [emailValue, passwordValue, refreshServerConfig]);
|
||||
|
||||
const onNext = useCallback(async () => {
|
||||
const onNext = useAsyncCallback(async () => {
|
||||
if (isCreateAdminStep) {
|
||||
if (
|
||||
!validateEmailAndPassword(
|
||||
|
||||
Reference in New Issue
Block a user