Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 8 additions & 4 deletions src/layouts/chat-layout/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { useLanguage } from "@/components/LanguageProvider";
import { useCallback, useState, useEffect } from "react";
import { Toast } from "@/components/screens-component/chat-screen/components/toast";
import { SettingsDrawer } from "@/components/screens-component/chat-screen/components/settings-drawer";
import { LocationPermissionDialog } from "@/components/screens-component/chat-screen/components/location-permission-dialog";
// import { LocationPermissionDialog } from "@/components/screens-component/chat-screen/components/location-permission-dialog";
import apiService from "@/lib/api-service";

const ONE_DAY = 24 * 60 * 60 * 1000;
Expand Down Expand Up @@ -48,7 +48,7 @@ function ChatLayout() {

const { language, t } = useLanguage();
const [settingsOpen, setSettingsOpen] = useState(false);
const [showLocationPrompt, setShowLocationPrompt] = useState(false);
// const [showLocationPrompt, setShowLocationPrompt] = useState(false);

useEffect(() => {
const cachedLocation = getCachedLocation();
Expand All @@ -70,14 +70,16 @@ function ChatLayout() {
if (cachedLocation) {
return;
}
setShowLocationPrompt(true);
// setShowLocationPrompt(true);
fetchLocation(undefined, { trackBrowserDecision: true });
}
// "denied" — skip silently
}).catch(() => {
if (cachedLocation) {
return;
}
setShowLocationPrompt(true);
// setShowLocationPrompt(true);
fetchLocation(undefined, { trackBrowserDecision: true });
});
}, [fetchLocation]);

Expand Down Expand Up @@ -153,6 +155,7 @@ function ChatLayout() {
onOpenChange={setSettingsOpen}
/>

{/* Custom location permission popup disabled — using native browser prompt instead
{showLocationPrompt && (
<LocationPermissionDialog
onAllow={() => {
Expand All @@ -179,6 +182,7 @@ function ChatLayout() {
}}
/>
)}
*/}

</div>
);
Expand Down
1 change: 1 addition & 0 deletions tsconfig.tsbuildinfo

Large diffs are not rendered by default.

Loading