Skip to content

Commit

Permalink
fix setting user directory
Browse files Browse the repository at this point in the history
  • Loading branch information
sickelap committed Nov 19, 2023
1 parent a945a7d commit ba4a1df
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/components/modals/ModalUserEdit.tsx
Original file line number Diff line number Diff line change
@@ -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";
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -239,7 +239,7 @@ export function ModalUserEdit(props: Props) {
<Modal
opened={isOpen}
centered
overflow="outside"
scrollAreaComponent={ScrollArea.Autosize}
size="xl"
onClose={() => {
closeModal();
Expand Down

0 comments on commit ba4a1df

Please sign in to comment.