Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 4 additions & 13 deletions src/app/components/CoveredAreaMap.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,10 @@ import {
import { OpenInNew } from '@mui/icons-material';
import { computeBoundingBox } from '../screens/Feed/Feed.functions';
import { displayFormattedDate } from '../utils/date';
import { useSelector } from 'react-redux';
import ModeOfTravelIcon from '@mui/icons-material/ModeOfTravel';
import ZoomOutMapIcon from '@mui/icons-material/ZoomOutMap';
import { useRemoteConfig } from '../context/RemoteConfigProvider';
import { sendGAEvent } from '@next/third-parties/google';
import { selectGtfsDatasetRoutesLoadingStatus } from '../store/supporting-files-selectors';
import {
getLatestGbfsVersion,
type LatestDatasetLite,
Expand Down Expand Up @@ -111,9 +109,6 @@ const CoveredAreaMap: React.FC<CoveredAreaMapProps> = ({
return getLatestGbfsVersion(feed as GBFSFeedType);
}, [feed]);

const routesJsonLoadingStatus = useSelector(
selectGtfsDatasetRoutesLoadingStatus,
);
const hasNoRoutes = totalRoutes == undefined || totalRoutes === 0;

const getAndSetGeoJsonData = (urlToExtract: string): void => {
Expand Down Expand Up @@ -174,7 +169,6 @@ const CoveredAreaMap: React.FC<CoveredAreaMapProps> = ({
// for gtfs feeds
if (
feed?.data_type === 'gtfs' &&
routesJsonLoadingStatus != 'failed' &&
!hasNoRoutes &&
boundingBox != undefined
) {
Expand All @@ -190,7 +184,7 @@ const CoveredAreaMap: React.FC<CoveredAreaMapProps> = ({
return;
}
setView('boundingBoxView');
}, [feed, routesJsonLoadingStatus, totalRoutes, boundingBox, geoJsonData]);
}, [feed, totalRoutes, boundingBox, geoJsonData]);

const handleViewChange = (
_: React.MouseEvent<HTMLElement>,
Expand Down Expand Up @@ -287,12 +281,9 @@ const CoveredAreaMap: React.FC<CoveredAreaMapProps> = ({
const latestAutodiscoveryUrl = getGbfsLatestVersionVisualizationUrl();
const enableGtfsVisualizationView = useMemo(() => {
return (
feed?.data_type === 'gtfs' &&
routesJsonLoadingStatus != 'failed' &&
!hasNoRoutes &&
boundingBox != undefined
feed?.data_type === 'gtfs' && !hasNoRoutes && boundingBox != undefined
);
}, [feed?.data_type, routesJsonLoadingStatus, hasNoRoutes, boundingBox]);
}, [feed?.data_type, hasNoRoutes, boundingBox]);

return (
<Box
Expand Down Expand Up @@ -417,7 +408,7 @@ const CoveredAreaMap: React.FC<CoveredAreaMapProps> = ({

{(boundingBox != undefined || !geoJsonError) && (
<Box key={view} sx={mapBoxPositionStyle}>
{geoJsonLoading || routesJsonLoadingStatus === 'loading' ? (
{geoJsonLoading ? (
<Skeleton
variant='rectangular'
width='100%'
Expand Down
88 changes: 0 additions & 88 deletions src/app/store/dataset-reducer.ts

This file was deleted.

58 changes: 0 additions & 58 deletions src/app/store/dataset-selectors.ts

This file was deleted.

137 changes: 0 additions & 137 deletions src/app/store/feed-reducer.ts

This file was deleted.

Loading
Loading