fixed type errors

This commit is contained in:
Zai Shi 2024-05-16 16:46:28 +02:00
parent 4d3500141a
commit 4176b6588e
2 changed files with 1 additions and 3 deletions

View File

@ -124,7 +124,5 @@ const columns: ColumnDef<ServerTeam>[] = [
];
export function TeamTable(props: { teams: ServerTeam[] }) {
const teams = useMemo(() => props.teams.sort((a, b) => b.createdAt - a.createdAt), [props.teams]);
return <DataTable data={props.teams} columns={columns} toolbarRender={toolbarRender} />;
}

View File

@ -187,7 +187,7 @@ export function extendUsers(users: ServerUser[]): ExtendedServerUser[] {
...user,
authType: (user.authWithEmail ? "email" : user.oauthProviders[0]) || "",
emailVerified: user.primaryEmailVerified ? "verified" : "unverified",
})).sort((a, b) => b.signedUpAt - a.signedUpAt);
} satisfies ExtendedServerUser)).sort((a, b) => a.signedUpAt > b.signedUpAt ? -1 : 1);
}
export function UserTable(props: { users: ServerUser[] }) {