mirror of
https://github.com/pacnpal/thrilltrack-explorer.git
synced 2025-12-22 03:11:12 -05:00
Fix: Add type field to submissions
This commit is contained in:
@@ -234,10 +234,16 @@ export async function fetchSubmissions(
|
|||||||
throw submissionsError;
|
throw submissionsError;
|
||||||
}
|
}
|
||||||
|
|
||||||
return {
|
// Enrich submissions with type field for UI conditional logic
|
||||||
submissions: submissions || [],
|
const enrichedSubmissions = (submissions || []).map(sub => ({
|
||||||
totalCount: count || 0,
|
...sub,
|
||||||
};
|
type: 'content_submission' as const,
|
||||||
|
}));
|
||||||
|
|
||||||
|
return {
|
||||||
|
submissions: enrichedSubmissions,
|
||||||
|
totalCount: count || 0,
|
||||||
|
};
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error('Error fetching submissions:', error);
|
console.error('Error fetching submissions:', error);
|
||||||
return {
|
return {
|
||||||
|
|||||||
Reference in New Issue
Block a user