fix: make member search case insensitive (#506)

This commit is contained in:
Jan 2022-01-14 17:54:34 +01:00 committed by GitHub
parent 5a46c50b81
commit dd39e13623
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -106,7 +106,11 @@ export const Members = ({ server }: Props) => {
const members = useMemo(
() =>
query
? data?.filter((x) => x.user?.username.includes(query))
? data?.filter((x) =>
x.user?.username
.toLowerCase()
.includes(query.toLowerCase()),
)
: data,
[data, query],
);