Skip to content

Commit

Permalink
sort settings user tables by email
Browse files Browse the repository at this point in the history
  • Loading branch information
lucia-gomez committed Sep 30, 2024
1 parent b6b4180 commit 15fdf22
Showing 1 changed file with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import React, { useMemo } from 'react';
import React, { useMemo } from "react";

import AddEmail from './AddEmail';
import ListTable from './ListTable';
import { TableNames } from '../../../policy';
import AddEmail from "./AddEmail";
import ListTable from "./ListTable";
import { TableNames } from "../../../policy";

interface EmailField {
email: string;
Expand All @@ -18,6 +18,7 @@ interface Props<T extends EmailField> {

export default function EmailListTable<T extends EmailField>(props: Props<T>) {
const addEmail = useMemo(() => <AddEmail {...props} />, [props]);
props.userList.sort((a, b) => a.email.localeCompare(b.email));

return (
<ListTable
Expand Down

0 comments on commit 15fdf22

Please sign in to comment.