From d17978777e944b79a33b5ae5744fd3dcdd9cbc5f Mon Sep 17 00:00:00 2001 From: Charles Bochet Date: Sat, 4 Nov 2023 10:35:45 +0100 Subject: [PATCH] Fix chromatic build --- .../pages/companies/__stories__/Companies.sortBy.stories.tsx | 4 ++-- front/src/pages/people/__stories__/People.sortBy.stories.tsx | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/front/src/pages/companies/__stories__/Companies.sortBy.stories.tsx b/front/src/pages/companies/__stories__/Companies.sortBy.stories.tsx index c42d9d304d..5b1560db20 100644 --- a/front/src/pages/companies/__stories__/Companies.sortBy.stories.tsx +++ b/front/src/pages/companies/__stories__/Companies.sortBy.stories.tsx @@ -27,9 +27,9 @@ const meta: Meta = { export default meta; -const sortedCompanyNames = mockedCompaniesData +const sortedCompanyNames = [...mockedCompaniesData] .map(({ name }) => name) - .toSorted(); + .sort((a, b) => a.localeCompare(b)); export const SortByName: Story = { play: async ({ canvasElement, step }) => { diff --git a/front/src/pages/people/__stories__/People.sortBy.stories.tsx b/front/src/pages/people/__stories__/People.sortBy.stories.tsx index acfae6c7bf..a50b5cea63 100644 --- a/front/src/pages/people/__stories__/People.sortBy.stories.tsx +++ b/front/src/pages/people/__stories__/People.sortBy.stories.tsx @@ -28,7 +28,7 @@ const meta: Meta = { export default meta; const peopleEmails = mockedPeopleData.map(({ email }) => email); -const sortedPeopleEmails = peopleEmails.toSorted(); +const sortedPeopleEmails = [...peopleEmails].sort((a, b) => a.localeCompare(b)); export const Email: Story = { play: async ({ canvasElement, step }) => {