Skip to content
Closed
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
3 changes: 0 additions & 3 deletions components/chat.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ import { MapDataProvider, useMapData } from './map/map-data-context'; // Add thi
import { updateDrawingContext } from '@/lib/actions/chat'; // Import the server action
import dynamic from 'next/dynamic'
import { HeaderSearchButton } from './header-search-button'
import { ReportButton } from './report-button'

type ChatProps = {
id?: string // This is the chatId
Expand Down Expand Up @@ -140,7 +139,6 @@ export function Chat({ id }: ChatProps) {
return (
<MapDataProvider> {/* Add Provider */}
<HeaderSearchButton />
<ReportButton />
<div className="mobile-layout-container">
<div className="mobile-map-section">
{activeView ? <SettingsView /> : isUsageOpen ? <UsageView /> : <MapProvider />}
Expand Down Expand Up @@ -187,7 +185,6 @@ export function Chat({ id }: ChatProps) {
return (
<MapDataProvider> {/* Add Provider */}
<HeaderSearchButton />
<ReportButton />
<div className="flex justify-start items-start">
{/* This is the new div for scrolling */}
<div className="w-1/2 flex flex-col space-y-3 md:space-y-4 px-8 sm:px-12 pt-16 md:pt-20 pb-4 h-[calc(100vh-0.5in)] overflow-y-auto">
Expand Down
2 changes: 0 additions & 2 deletions components/header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,6 @@ export const Header = () => {

<MapToggle />

<div id="header-report-portal" className="contents" />

<Button variant="ghost" size="icon" onClick={toggleCalendar} title="Open Calendar" data-testid="calendar-toggle">
<CalendarDays className="h-[1.2rem] w-[1.2rem]" />
</Button>
Expand Down
6 changes: 1 addition & 5 deletions components/report-button.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import { useAIState } from 'ai/rsc'
import { useMapData } from '@/components/map/map-data-context'
import { useMap } from '@/components/map/map-context'
import { generateReport } from '@/lib/utils/report-generator'
import { toast } from 'sonner'

interface ReportButtonProps {
inline?: boolean
Expand Down Expand Up @@ -42,15 +41,12 @@ export const ReportButton = ({ inline = false }: ReportButtonProps) => {
mapSnapshot,
chatTitle
})

toast.success('Report generated successfully')
} catch (error) {
console.error('Failed to generate report:', error)
toast.error('Failed to generate report')
} finally {
setIsGenerating(false)
}
}


const button = (
<Button
Expand Down