Skip to content

Commit 00b6ce4

Browse files
authored
fix: rendered more hooks (#1392)
1 parent 2d988ff commit 00b6ce4

File tree

1 file changed

+11
-10
lines changed

1 file changed

+11
-10
lines changed

web-app/src/app/screens/Feed/components/FullMapView.tsx

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -55,16 +55,6 @@ export default function FullMapView(): React.ReactElement {
5555
const { t } = useTranslation('feeds');
5656
const { config } = useRemoteConfig();
5757

58-
if (!config.enableGtfsVisualizationMap) {
59-
return (
60-
<Box>
61-
<Alert severity='error' sx={{ m: 2 }}>
62-
<AlertTitle>{t('fullMapView.disabledTitle')}</AlertTitle>
63-
{t('fullMapView.disabledDescription')}
64-
</Alert>
65-
</Box>
66-
);
67-
}
6858
const { feedId } = useParams();
6959
const navigate = useNavigate();
7060

@@ -305,6 +295,17 @@ export default function FullMapView(): React.ReactElement {
305295
</Box>
306296
);
307297

298+
if (!config.enableGtfsVisualizationMap) {
299+
return (
300+
<Box>
301+
<Alert severity='error' sx={{ m: 2 }}>
302+
<AlertTitle>{t('fullMapView.disabledTitle')}</AlertTitle>
303+
{t('fullMapView.disabledDescription')}
304+
</Alert>
305+
</Box>
306+
);
307+
}
308+
308309
return (
309310
<>
310311
<Box

0 commit comments

Comments
 (0)