mirror of
https://github.com/CorentinTh/it-tools.git
synced 2025-04-24 00:36:14 -04:00
fix: tool sorting inconsistencies in home page
This commit is contained in:
parent
f05c8e1dc6
commit
5ab4dd3d4a
1 changed files with 7 additions and 1 deletions
|
@ -9,7 +9,13 @@ useHead({ title: 'IT Tools - Handy online tools for developers' });
|
|||
<template>
|
||||
<div class="home-page">
|
||||
<n-grid x-gap="12" y-gap="12" cols="1 400:2 800:3 1200:4 2000:8">
|
||||
<n-gi v-for="tool in toolsWithCategory.reverse().sort(({ isNew }) => (isNew ? -1 : 1))" :key="tool.name">
|
||||
<n-gi
|
||||
v-for="tool in [
|
||||
...toolsWithCategory.filter(({ isNew }) => isNew),
|
||||
...toolsWithCategory.filter(({ isNew }) => !isNew),
|
||||
]"
|
||||
:key="tool.name"
|
||||
>
|
||||
<tool-card :tool="tool" />
|
||||
</n-gi>
|
||||
</n-grid>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue