feat: add match data to suggestions and chat link for accepted recordings
Backend changes:
- Modified getUserSuggestions to include match data (id, slug, status)
- Returns match info for both toBeRecorded and toRecord suggestions
Frontend changes:
- Added useNavigate hook to RecordingTab
- Capture match data from updateSuggestionStatus response
- Added MessageCircle icon and chat button to SuggestionCard
- Show "Open Chat" button for accepted suggestions with active matches
- Navigate to /matches/{matchSlug}/chat when clicked
This completes the recording stats flow by allowing users to easily
access the match chat after accepting a recording suggestion.
This commit is contained in:
@@ -511,6 +511,13 @@ async function getUserSuggestions(eventId, userId) {
|
||||
city: true,
|
||||
country: true,
|
||||
}
|
||||
},
|
||||
match: {
|
||||
select: {
|
||||
id: true,
|
||||
slug: true,
|
||||
status: true,
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
@@ -534,6 +541,13 @@ async function getUserSuggestions(eventId, userId) {
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
match: {
|
||||
select: {
|
||||
id: true,
|
||||
slug: true,
|
||||
status: true,
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user