@@ -8,7 +8,7 @@ import { WidthAdjustablePanel } from "./components";
8
8
import MapInterface from "./map-interface" ;
9
9
import { useStoredState } from "@macrostrat/ui-components" ;
10
10
import { ParentRouteButton } from "~/components/map-navbar" ;
11
- import { Button } from "@blueprintjs/core" ;
11
+ import { Button , HotkeysProvider } from "@blueprintjs/core" ;
12
12
13
13
export const h = hyper . styled ( styles ) ;
14
14
@@ -43,41 +43,43 @@ export default function EditInterface({
43
43
44
44
const title = mapBounds . properties . name ;
45
45
46
- return h ( "div.edit-page" , [
47
- h (
48
- WidthAdjustablePanel ,
49
- {
50
- expand : ! showMap ,
51
- className : "edit-page-content" ,
52
- storageID : "edit-panel-width" ,
53
- } ,
54
- // TODO: make this basename dynamic
55
- h ( [
56
- h ( "div.edit-page-header" , [
57
- h ( ParentRouteButton , { parentRoute : "/maps/" } ) ,
58
- h ( "h2" , title ) ,
59
- h ( "div.spacer" ) ,
60
- h ( "div.edit-page-buttons" , [
61
- h ( ShowMapButton , { showMap, setShowMap } ) ,
46
+ return h ( HotkeysProvider , [
47
+ h ( "div.edit-page" , [
48
+ h (
49
+ WidthAdjustablePanel ,
50
+ {
51
+ expand : ! showMap ,
52
+ className : "edit-page-content" ,
53
+ storageID : "edit-panel-width" ,
54
+ } ,
55
+ // TODO: make this basename dynamic
56
+ h ( [
57
+ h ( "div.edit-page-header" , [
58
+ h ( ParentRouteButton , { parentRoute : "/maps/" } ) ,
59
+ h ( "h2" , title ) ,
60
+ h ( "div.spacer" ) ,
61
+ h ( "div.edit-page-buttons" , [
62
+ h ( ShowMapButton , { showMap, setShowMap } ) ,
63
+ ] ) ,
62
64
] ) ,
63
- ] ) ,
64
- h ( Router , { basename : `/maps/${ source_id } /edit` } , [
65
- h ( Routes , [
66
- h ( Route , {
67
- path : "" ,
68
- element : h ( EditMenu ) ,
69
- } ) ,
70
- h ( Route , {
71
- path : "polygons" ,
72
- element : h ( EditTable , {
73
- url : `${ import . meta. env . VITE_MACROSTRAT_INGEST_API } /sources/${ source_id } /polygons` ,
65
+ h ( Router , { basename : `/maps/${ source_id } /edit` } , [
66
+ h ( Routes , [
67
+ h ( Route , {
68
+ path : "" ,
69
+ element : h ( EditMenu ) ,
74
70
} ) ,
75
- } ) ,
76
- ] ) ,
77
- ] ) ,
78
- ] )
79
- ) ,
80
- h . if ( showMap ) ( MapInterface , { id : source_id , map : mapBounds } ) ,
71
+ h ( Route , {
72
+ path : "polygons" ,
73
+ element : h ( EditTable , {
74
+ url : `${ import . meta. env . VITE_MACROSTRAT_INGEST_API } /sources/${ source_id } /polygons` ,
75
+ } ) ,
76
+ } ) ,
77
+ ] ) ,
78
+ ] )
79
+ ] )
80
+ ) ,
81
+ h . if ( showMap ) ( MapInterface , { id : source_id , map : mapBounds } ) ,
82
+ ] ) ,
81
83
] ) ;
82
84
}
83
85
0 commit comments