Skip to content

Commit

Permalink
return street view widget (#1170)
Browse files Browse the repository at this point in the history
  • Loading branch information
ReutSher1 authored Dec 18, 2024
1 parent 7a01b6c commit 504659a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
11 changes: 6 additions & 5 deletions src/components/molecules/widgets/WidgetWrapper.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import {
IWidgetAccidentCountByCarType,
IWidgetInjuredAccidentsWithPedestrians,
IWidgetKilledAndInjuredCountPerAgeGroup,
IWidgetStreetViewData,
} from 'models/WidgetData';
import visionZeroImage from 'assets/vision_zero_2_plus_1.png';
import vision_zero_10_50_90 from 'assets/vision_zero_10_50_90.png';
Expand All @@ -43,6 +44,7 @@ import { WidgetName } from 'models/WidgetName';
import KilledAndInjuredCountPerAgeGroupWidget from './KilledAndInjuredCountPerAgeGroupWidget';
import { getInjuredBySeverityVerbLabel } from 'utils/text.utils';
import KilledAndInjuredCountPerAgeGroupStackedWidget from './KilledAndInjuredCountPerAgeGroupStackedWidget';
import StreetViewWidget from './StreetViewWidget';

interface IProps {
widget: IWidgetBase;
Expand Down Expand Up @@ -80,11 +82,10 @@ const WidgetWrapper: FC<IProps> = ({ widget, locationText, sizeOptions, editorBa
widgetComponent = <HeatMap data={data.items as IPoint[]} />;
break;
}
// remove street_view until fixed
// case WidgetName.street_view: {
// widgetComponent = <StreetViewWidget data={data as IWidgetStreetViewData} />;
// break;
// }
case WidgetName.street_view: {
widgetComponent = <StreetViewWidget data={data as IWidgetStreetViewData} />;
break;
}
case WidgetName.accident_count_by_severity: {
widgetComponent = (
<CountBySeverityTextWidget
Expand Down
3 changes: 1 addition & 2 deletions src/services/data.verification/data.verification.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,7 @@ export const verifiedWidgetData = (widget: any) => {
break;
}
case 'street_view': {
//temporary till fixing widget
// isValid = validCoords(items.latitude) && validCoords(items.longitude);
isValid = validCoords(items.latitude) && validCoords(items.longitude);
break;
}
case 'most_severe_accidents': {
Expand Down

0 comments on commit 504659a

Please sign in to comment.