mirror of
https://github.com/pheralb/svgl.git
synced 2025-12-29 08:01:36 +08:00
🚀 Merge branch 'main' of github.com:pheralb/svgl into next.
This commit is contained in:
@@ -12,6 +12,8 @@
|
||||
import SvgCard from '@/components/svgCard.svelte';
|
||||
import Grid from '@/components/grid.svelte';
|
||||
import NotFound from '@/components/notFound.svelte';
|
||||
|
||||
// Icons:
|
||||
import { ArrowDownUpIcon, ArrowUpDownIcon } from 'lucide-svelte';
|
||||
|
||||
let sorted: boolean = false;
|
||||
@@ -61,7 +63,7 @@
|
||||
|
||||
// Sort by latest:
|
||||
const sortByLatest = () => {
|
||||
filteredSvgs = allSvgs.sort((a: iSVG, b: iSVG) => {
|
||||
filteredSvgs = filteredSvgs.sort((a: iSVG, b: iSVG) => {
|
||||
return b.id! - a.id!;
|
||||
});
|
||||
};
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
|
||||
if (searchTerm.length === 0) {
|
||||
filteredSvgs = svgsByCategory.sort((a: iSVG, b: iSVG) => {
|
||||
return b.id! - a.id!;
|
||||
return a.title.localeCompare(b.title);
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user