From 14496c5c1d4ea3d8862e819901debe73b7f58e54 Mon Sep 17 00:00:00 2001 From: Pablo Hdez <62877300+pheralb@users.noreply.github.com> Date: Thu, 14 Dec 2023 12:42:25 +0000 Subject: [PATCH] =?UTF-8?q?=E2=9A=99=EF=B8=8F=20Update=20svgs=20page=20wit?= =?UTF-8?q?h=20new=20data.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/routes/+page.svelte | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/routes/+page.svelte b/src/routes/+page.svelte index 2adc392..c49724b 100644 --- a/src/routes/+page.svelte +++ b/src/routes/+page.svelte @@ -2,8 +2,8 @@ import type { iSVG } from '@/types/svg'; // Get all svgs: - import { svgs } from '@/data/svgs'; - const allSvgs = JSON.parse(JSON.stringify(svgs)); + import { svgsData } from '@/data'; + const allSvgs = JSON.parse(JSON.stringify(svgsData)); // Components: import Search from '@/components/search.svelte'; @@ -22,7 +22,7 @@ if (searchTerm.length === 0) { filteredSvgs = allSvgs.sort((a: iSVG, b: iSVG) => { - return b.id - a.id; + return b.id! - a.id!; }); } @@ -60,7 +60,7 @@ // Sort by latest: const sortByLatest = () => { filteredSvgs = filteredSvgs.sort((a: iSVG, b: iSVG) => { - return b.id - a.id; + return b.id! - a.id!; }); };