From fdc9d14c47c5e4d2eda9264592b1d7387dee6330 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADctor=20Falc=C3=B3n?= Date: Tue, 3 Mar 2026 21:40:50 +0000 Subject: [PATCH] fix(haptics): restore haptic feedback to MobileBackButton (#198) ## Summary - Restores `useWebHaptics` import and `trigger('light')` call to `MobileBackButton` that was lost during rebase - Both the floating and inline back buttons now fire haptic feedback on tap via the shared `handleBack` function --- resources/js/components/mobile-back-button.tsx | 3 +++ 1 file changed, 3 insertions(+) diff --git a/resources/js/components/mobile-back-button.tsx b/resources/js/components/mobile-back-button.tsx index 96943b83..576eecd7 100644 --- a/resources/js/components/mobile-back-button.tsx +++ b/resources/js/components/mobile-back-button.tsx @@ -2,6 +2,7 @@ import { cn } from '@/lib/utils'; import { router } from '@inertiajs/react'; import { ArrowLeft } from 'lucide-react'; import { useEffect, useState } from 'react'; +import { useWebHaptics } from 'web-haptics/react'; interface Props { href: string; @@ -10,6 +11,7 @@ interface Props { export function MobileBackButton({ href, className }: Props) { const [isScrolled, setIsScrolled] = useState(false); + const { trigger } = useWebHaptics(); useEffect(() => { function handleScroll() { @@ -23,6 +25,7 @@ export function MobileBackButton({ href, className }: Props) { }, []); function handleBack() { + trigger('light'); router.visit(href); }