@@ -25,7 +25,7 @@ import {
2525 type SetStateAction ,
2626} from "react" ;
2727import * as stacWasm from "../../stac-wasm" ;
28- import { useLayersDispatch } from "../map/context" ;
28+ import { useMapDispatch } from "../map/context" ;
2929import { toaster } from "../ui/toaster" ;
3030import { useDuckDbQuery } from "./hooks" ;
3131import type { StacValue } from "./types" ;
@@ -62,7 +62,7 @@ function Layer({
6262 path,
6363 select : "ST_AsWKB(geometry) as geometry, id" ,
6464 } ) ;
65- const dispatch = useLayersDispatch ( ) ;
65+ const dispatch = useMapDispatch ( ) ;
6666
6767 useEffect ( ( ) => {
6868 if ( table ) {
@@ -123,7 +123,7 @@ function SummaryDataList({ path }: { path: string }) {
123123 "COUNT(*) as count, MIN(bbox.xmin) as xmin, MIN(bbox.ymin) as ymin, MAX(bbox.xmax) as xmax, MAX(bbox.ymax) as ymax" ,
124124 } ) ;
125125 const [ summary , setSummary ] = useState < Summary | undefined > ( ) ;
126- const dispatch = useLayersDispatch ( ) ;
126+ const dispatch = useMapDispatch ( ) ;
127127
128128 useEffect ( ( ) => {
129129 if ( table ) {
@@ -137,7 +137,7 @@ function SummaryDataList({ path }: { path: string }) {
137137
138138 useEffect ( ( ) => {
139139 if ( summary ?. bbox ) {
140- dispatch ( { type : "set-bbox" , bbox : summary . bbox } ) ;
140+ dispatch ( { type : "set-fit- bbox" , bbox : summary . bbox } ) ;
141141 }
142142 } , [ summary ?. bbox , dispatch ] ) ;
143143
0 commit comments