mirror of
https://github.com/Hackdex-App/hackdex-website.git
synced 2026-04-24 06:57:10 -05:00
Fix tag category missing from SubmitForm
This commit is contained in:
parent
44027f15f6
commit
6e759b9446
|
|
@ -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) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user