From 3fbf44238d4029d036d1048f21412c51cc459b57 Mon Sep 17 00:00:00 2001 From: cedoor Date: Wed, 10 Jan 2024 23:03:18 +0000 Subject: [PATCH] fix(website): copy array of projects before sorting --- apps/website/src/components/ProjectsList.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/website/src/components/ProjectsList.tsx b/apps/website/src/components/ProjectsList.tsx index d1badf426..5cf198856 100644 --- a/apps/website/src/components/ProjectsList.tsx +++ b/apps/website/src/components/ProjectsList.tsx @@ -11,7 +11,7 @@ import IconPSE from "../icons/IconPSE" import { chunkArray } from "../utils/chunkArray" import { getProjectCategories } from "../utils/getProjectCategories" -const sortedProjects = allProjects.sort((a, b) => a.name.localeCompare(b.name)) +const sortedProjects = allProjects.slice().sort((a, b) => a.name.localeCompare(b.name)) export default function ProjectsList(props: any) { const [projects, setProjects] = useState<(typeof allProjects)[]>(chunkArray(sortedProjects))