Skip to content

Commit 177d5e2

Browse files
committed
🐛 Fix website hub filtering
Before this commit, it was impossible to filter by commit
1 parent 3c08194 commit 177d5e2

File tree

1 file changed

+18
-21
lines changed

1 file changed

+18
-21
lines changed

website/src/pages/queries/index.astro

Lines changed: 18 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,9 @@ for (const query of remoteQueries.queries) {
2121
}
2222
}
2323
24+
// Get an array of plugin names that have queries
25+
const pluginNamesWithQueries = Array.from(pluginsWithQueries).sort();
26+
2427
const allQueries = remoteQueries;
2528
---
2629

@@ -86,27 +89,21 @@ Anyquery allows you to run SQL queries on pretty-much any data source`}
8689
</h2>
8790
<div class="flex flex-wrap gap-2">
8891
{
89-
Array.from(pluginsWithQueries)
90-
.sort((a, b) => a[0].localeCompare(b[0]))
91-
.map(([pluginName, _]) => {
92-
const plugin = pluginsMapper[pluginName];
93-
if (!plugin) {
94-
return;
95-
}
96-
return (
97-
<a
98-
class="flex items-center text-xs bg-white/10 px-4 py-2 rounded-md"
99-
href={`/queries/plugin/${plugin.name}`}
100-
>
101-
<img
102-
class="h-4 w-4 mr-2"
103-
src={plugin.icon}
104-
alt=""
105-
/>
106-
{plugin.display_name}
107-
</a>
108-
);
109-
})
92+
pluginNamesWithQueries.map((pluginName) => {
93+
const plugin = pluginsMapper[pluginName];
94+
if (!plugin) {
95+
return;
96+
}
97+
return (
98+
<a
99+
class="flex items-center text-xs bg-white/10 px-4 py-2 rounded-md"
100+
href={`/queries/plugin/${plugin.name}`}
101+
>
102+
<img class="h-4 w-4 mr-2" src={plugin.icon} alt="" />
103+
{plugin.display_name}
104+
</a>
105+
);
106+
})
110107
}
111108
</div>
112109
<a

0 commit comments

Comments
 (0)