replace underscores with spaces in labels

This commit is contained in:
Josh Hawkins 2024-07-12 08:34:04 -05:00
parent ccb612bb52
commit cff018c432

View File

@ -72,13 +72,17 @@ export default function CameraSettingsView({
const alertsLabels = useMemo(() => { const alertsLabels = useMemo(() => {
return cameraConfig?.review.alerts.labels return cameraConfig?.review.alerts.labels
? cameraConfig.review.alerts.labels.join(", ") ? cameraConfig.review.alerts.labels
.map((label) => label.replaceAll("_", " "))
.join(", ")
: ""; : "";
}, [cameraConfig]); }, [cameraConfig]);
const detectionsLabels = useMemo(() => { const detectionsLabels = useMemo(() => {
return cameraConfig?.review.detections.labels return cameraConfig?.review.detections.labels
? cameraConfig.review.detections.labels.join(", ") ? cameraConfig.review.detections.labels
.map((label) => label.replaceAll("_", " "))
.join(", ")
: ""; : "";
}, [cameraConfig]); }, [cameraConfig]);