Skip to content

Commit

Permalink
add geolocation access permission popup
Browse files Browse the repository at this point in the history
  • Loading branch information
PaulaScharf committed Sep 4, 2024
1 parent d02c8b2 commit c86c2e3
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/components/Device/GeolocationPermissionDrawer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import {
DrawerHeader,
DrawerTitle,
} from '../ui/drawer'
import { Geolocation } from '@capacitor/geolocation';

export default function GeolocationPermissionDrawer() {
const showGeolocationPermissionsDrawer = usePermissionsStore(
Expand Down Expand Up @@ -41,7 +42,10 @@ export default function GeolocationPermissionDrawer() {
</DrawerClose>
<Button
className="flex-1"
onClick={() => setGeolocationPermissionGranted(true)}
onClick={() => {
Geolocation.requestPermissions();
setGeolocationPermissionGranted(true);
}}
>
Akzeptieren
</Button>
Expand Down

0 comments on commit c86c2e3

Please sign in to comment.