mirror of
https://github.com/Hackdex-App/hackdex-website.git
synced 2026-08-22 08:34:13 -05:00
Fix tag category missing from SubmitForm
This commit is contained in:
@@ -198,7 +198,7 @@ export default function SubmitForm({ dummy = false }: SubmitFormProps) {
|
||||
try {
|
||||
const { data, error } = await supabase.from('tags').select('id, name, usage: hack_tags (count)');
|
||||
if (error) return;
|
||||
const fetchedTags: TagSortable[] = (data || []).map((t: any) => ({ id: t.id, name: t.name, popularity: t.usage[0].count || 0 }));
|
||||
const fetchedTags: TagSortable[] = (data || []).map((t: any) => ({ id: t.id, name: t.name, popularity: t.usage[0].count || 0, category: t.category }));
|
||||
setAllTags(
|
||||
fetchedTags.sort((a, b) => {
|
||||
if (b.popularity !== a.popularity) {
|
||||
|
||||
Reference in New Issue
Block a user