mirror of
https://github.com/CorentinTh/it-tools.git
synced 2026-08-27 04:05:27 +00:00
Order newest tools by createdAt so the latest tool shows first
This commit is contained in:
parent
fb4f9bbb60
commit
e52e33ac4f
1 changed files with 3 additions and 1 deletions
|
|
@ -42,7 +42,9 @@ export const useToolStore = defineStore('tools', () => {
|
|||
tools,
|
||||
favoriteTools,
|
||||
toolsByCategory,
|
||||
newTools: computed(() => tools.value.filter(({ isNew }) => isNew)),
|
||||
newTools: computed(() => tools.value
|
||||
.filter(({ isNew }) => isNew)
|
||||
.sort((a, b) => (b.createdAt?.getTime() ?? 0) - (a.createdAt?.getTime() ?? 0))),
|
||||
|
||||
addToolToFavorites({ tool }: { tool: MaybeRef<Tool> }) {
|
||||
const toolPath = get(tool).path;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue