aboutsummaryrefslogtreecommitdiff
path: root/modern/src
diff options
context:
space:
mode:
Diffstat (limited to 'modern/src')
-rw-r--r--modern/src/common/components/PageLayout.js5
-rw-r--r--modern/src/map/main/MapLiveRoutes.js2
2 files changed, 4 insertions, 3 deletions
diff --git a/modern/src/common/components/PageLayout.js b/modern/src/common/components/PageLayout.js
index 43fd68ea..67ad4c01 100644
--- a/modern/src/common/components/PageLayout.js
+++ b/modern/src/common/components/PageLayout.js
@@ -42,6 +42,7 @@ const useStyles = makeStyles((theme) => ({
alignItems: 'stretch',
display: 'flex',
flexDirection: 'column',
+ overflowY: 'auto',
},
}));
@@ -53,7 +54,7 @@ const PageTitle = ({ breadcrumbs }) => {
if (desktop) {
return (
- <Typography variant="h6" noWrap>{t(breadcrumbs.at(0))}</Typography>
+ <Typography variant="h6" noWrap>{t(breadcrumbs[0])}</Typography>
);
}
return (
@@ -61,7 +62,7 @@ const PageTitle = ({ breadcrumbs }) => {
{breadcrumbs.slice(0, -1).map((breadcrumb) => (
<Typography variant="h6" color="inherit" key={breadcrumb}>{t(breadcrumb)}</Typography>
))}
- <Typography variant="h6" color="textPrimary">{t(breadcrumbs.at(-1))}</Typography>
+ <Typography variant="h6" color="textPrimary">{t(breadcrumbs[breadcrumbs.length - 1])}</Typography>
</Breadcrumbs>
);
};
diff --git a/modern/src/map/main/MapLiveRoutes.js b/modern/src/map/main/MapLiveRoutes.js
index 6e79d7af..139f7d65 100644
--- a/modern/src/map/main/MapLiveRoutes.js
+++ b/modern/src/map/main/MapLiveRoutes.js
@@ -57,7 +57,7 @@ const MapLiveRoutes = () => {
setRoute([position]);
}
} else if (position) {
- const last = route.at(-1);
+ const last = route.findLast(() => true);
if (!last || (last.latitude !== position.latitude && last.longitude !== position.longitude)) {
setRoute([...route.slice(-9), position]);
}