Skip to content

Commit

Permalink
feat: filter ann by channel
Browse files Browse the repository at this point in the history
+ revert queries lib to v4
  • Loading branch information
madkarmaa committed Sep 4, 2024
1 parent 28a81cf commit 644e46f
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 18 deletions.
22 changes: 6 additions & 16 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
"@tanstack/query-core": "^4.36.1",
"@tanstack/query-persist-client-core": "^4.36.1",
"@tanstack/query-sync-storage-persister": "^4.36.1",
"@tanstack/svelte-query": "^5.54.1",
"@tanstack/svelte-query": "^4.36.1",
"datetrigger": "^1.1.1",
"moment": "^2.30.1"
}
Expand Down
2 changes: 1 addition & 1 deletion src/layout/Announcements/CardsList.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

<div class="announcements-list">
<Query {query} let:data>
{#each data.announcements as ann (ann.id)}
{#each channel ? data.announcements.filter((a) => a.channel === channel) : data.announcements as ann (ann.id)}
<AnnouncementCard title={ann.title} author={ann.author} created_at={ann.createdAt.value}>
<svelte:fragment slot="channel">
<ChannelChip channel={ann.channel} />
Expand Down

0 comments on commit 644e46f

Please sign in to comment.