chore: restrict usage of variables shorther than 3 characters (#255)
* chore: restrict usage of variables shorther than 3 characters * chore: change highlighting to warning
This commit is contained in:
@@ -65,11 +65,11 @@ export const AccessSettingsContent = ({ board, initialPermissions }: Props) => {
|
||||
const { openModal } = useModalAction(UserSelectModal);
|
||||
|
||||
const handleSubmit = useCallback(
|
||||
(v: FormType) => {
|
||||
(values: FormType) => {
|
||||
mutate(
|
||||
{
|
||||
id: board.id,
|
||||
permissions: v.permissions,
|
||||
permissions: values.permissions,
|
||||
},
|
||||
{
|
||||
onSuccess: () => {
|
||||
@@ -250,8 +250,8 @@ export const UserSelectModal = createModal<InnerProps>(
|
||||
const t = useI18n();
|
||||
const { data: users } = clientApi.user.selectable.useQuery();
|
||||
const form = useForm<UserSelectFormType>();
|
||||
const handleSubmit = (v: UserSelectFormType) => {
|
||||
const currentUser = users?.find((user) => user.id === v.userId);
|
||||
const handleSubmit = (values: UserSelectFormType) => {
|
||||
const currentUser = users?.find((user) => user.id === values.userId);
|
||||
if (!currentUser) return;
|
||||
innerProps.onSelect({
|
||||
id: currentUser.id,
|
||||
|
||||
@@ -45,6 +45,7 @@ export const ColorSettingsContent = ({ board }: Props) => {
|
||||
const theme = useMantineTheme();
|
||||
const { mutate: savePartialSettings, isPending } =
|
||||
useSavePartialSettingsMutation(board);
|
||||
|
||||
return (
|
||||
<form
|
||||
onSubmit={form.onSubmit((values) => {
|
||||
|
||||
Reference in New Issue
Block a user