Fix handling of default group (#12459)

This commit is contained in:
Nicolas Mowen 2024-07-15 10:18:01 -06:00 committed by GitHub
parent c850604931
commit b7cf5f4105
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 5 additions and 2 deletions

View File

@ -57,7 +57,10 @@ export function AnimatedEventCard({
const navigate = useNavigate(); const navigate = useNavigate();
const onOpenReview = useCallback(() => { const onOpenReview = useCallback(() => {
const url = selectedGroup ? `review?group=${selectedGroup}` : "review"; const url =
selectedGroup && selectedGroup != "default"
? `review?group=${selectedGroup}`
: "review";
navigate(url, { navigate(url, {
state: { state: {
severity: event.severity, severity: event.severity,

View File

@ -69,7 +69,7 @@ export default function Events() {
useApiFilter<ReviewFilter>(); useApiFilter<ReviewFilter>();
useSearchEffect("group", (reviewGroup) => { useSearchEffect("group", (reviewGroup) => {
if (config && reviewGroup) { if (config && reviewGroup && reviewGroup != "default") {
const group = config.camera_groups[reviewGroup]; const group = config.camera_groups[reviewGroup];
const isBirdseyeOnly = const isBirdseyeOnly =
group.cameras.length == 1 && group.cameras[0] == "birdseye"; group.cameras.length == 1 && group.cameras[0] == "birdseye";