Skip to content

The open alternative to Salesforce, designed for AI.

refactor: keep type of sortsAvailable while having type assertion

Sammy Teillet99aa39f2bacc
diff --git a/front/src/pages/people/People.tsx b/front/src/pages/people/People.tsx
index e5d136a85fb..219c9efd607 100644
--- a/front/src/pages/people/People.tsx
+++ b/front/src/pages/people/People.tsx
@@ -32,7 +32,7 @@ const reduceSortsToOrderBy = (sorts: Array<SortType>): OrderBy[] => {
return [mappedSorts];
};
-const sortsAvailable: Array<SortType<keyof GraphqlPerson>> = [
+const sortsAvailable = [
{
id: 'created_at',
label: 'Created at',
@@ -45,7 +45,7 @@ const sortsAvailable: Array<SortType<keyof GraphqlPerson>> = [
order: 'asc',
icon: faEnvelope,
},
-];
+] satisfies Array<SortType<keyof GraphqlPerson>>;
function People() {
const [, setSorts] = useState([] as Array<SortType>);