Skip to content

Commit ba53175

Browse files
committed
fix(frontend): call function conditionally
Fixes #909.
1 parent aa589a2 commit ba53175

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

apps/frontend/app/routes/_dashboard.fitness.workouts.current.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,7 @@ export default function Page() {
223223
useEffect(() => {
224224
const timeRemaining = currentTimer?.endAt.diff(dayjsLib(), "second");
225225
if (timeRemaining && timeRemaining <= 3) {
226-
navigator.vibrate(200);
226+
if (navigator.vibrate) navigator.vibrate(200);
227227
if (timeRemaining <= 1) {
228228
playCompleteTimerSound();
229229
timerDrawerClose();

apps/frontend/app/routes/_dashboard.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -260,7 +260,7 @@ export function ErrorBoundary() {
260260
const error = useRouteError() as Error;
261261

262262
return (
263-
<Container size="sm" pt={200}>
263+
<Container size="sm" py={{ base: 100, md: 200 }}>
264264
<Stack p={{ base: "sm", md: "xl" }}>
265265
<Text c="red" fz={{ base: 30, md: 40 }}>
266266
We encountered an error

0 commit comments

Comments
 (0)