From f71a1b493556e2b05c00690d011dd5e55785dea5 Mon Sep 17 00:00:00 2001 From: Genadijus Paleckis Date: Sun, 19 Nov 2023 15:37:49 +0000 Subject: [PATCH] fix setting user directory (#411) --- src/components/modals/ModalUserEdit.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/components/modals/ModalUserEdit.tsx b/src/components/modals/ModalUserEdit.tsx index 9d991ee8..439f108c 100644 --- a/src/components/modals/ModalUserEdit.tsx +++ b/src/components/modals/ModalUserEdit.tsx @@ -1,4 +1,4 @@ -import { Box, Button, Grid, Modal, SimpleGrid, Space, Text, TextInput, Title } from "@mantine/core"; +import { Box, Button, Grid, Modal, ScrollArea, SimpleGrid, Space, Text, TextInput, Title } from "@mantine/core"; import { useForm } from "@mantine/form"; import type { FormEvent } from "react"; import React, { useEffect, useRef, useState } from "react"; @@ -71,7 +71,7 @@ export function ModalUserEdit(props: Props) { if (!username) { return t("modaluseredit.errorusernamecannotbeblank"); } - const exist = userList.results.reduce( + const exist = userList.reduce( (acc: boolean, user: IUser) => acc || (user.id !== userToEdit.id && user.username.toLowerCase() === username.toLowerCase()), false @@ -239,7 +239,7 @@ export function ModalUserEdit(props: Props) { { closeModal();