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 f2032ad
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 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
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ interface Props {

const ListTableWrapper = styled(Table)`
th {
padding-right: 16px;
padding-right: 16px !important;
}
`;

Expand Down

0 comments on commit f2032ad

Please sign in to comment.