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:
Meier Lukas
2024-03-20 20:58:24 +01:00
committed by GitHub
parent 361700b239
commit 92a8db718c
4 changed files with 18 additions and 6 deletions

View File

@@ -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,

View File

@@ -45,6 +45,7 @@ export const ColorSettingsContent = ({ board }: Props) => {
const theme = useMantineTheme();
const { mutate: savePartialSettings, isPending } =
useSavePartialSettingsMutation(board);
return (
<form
onSubmit={form.onSubmit((values) => {