Skip to content

Commit 9201264

Browse files
Merge pull request #52 from Juliusolsson05/fix/chat-hide-on-map
fix: hide chat on map routes
2 parents 22c17d0 + 8246b63 commit 9201264

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

src/features/chat/components/ChatWidget.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,8 @@ export function ChatWidget() {
3232
const { messages, input, setInput, isLoading, isReady, error, handleSubmit, stop, clear } = useChat({
3333
conflictId: CONFLICT_ID,
3434
});
35-
const shouldShowOnCurrentRoute = !isMobile || MOBILE_CHAT_ROUTES.includes(pathname);
35+
const isMapRoute = pathname.startsWith('/dashboard/map');
36+
const shouldShowOnCurrentRoute = !isMapRoute && (!isMobile || MOBILE_CHAT_ROUTES.includes(pathname));
3637

3738
// Lock body scroll on mobile when chat is open
3839
useEffect(() => {

0 commit comments

Comments
 (0)