55 MapView ,
66 buildInspectorStyle
77} from "@macrostrat/map-interface" ;
8- import { mapboxAccessToken , matomoToken , matomoApiURL , tileserverDomain } from "~/settings" ;
8+ import { mapboxAccessToken , postgrestPrefix , tileserverDomain } from "~/settings" ;
99import { Footer } from "~/components" ;
1010import { Divider , Spinner , Tabs , Tab } from "@blueprintjs/core" ;
1111import { useEffect , useState } from "react" ;
@@ -24,12 +24,22 @@ export function Page() {
2424}
2525
2626function PageHeader ( ) {
27+ const stats = useAPIResult ( `${ postgrestPrefix } /rockd_stats` ) ?. [ 0 ] ;
28+ if ( stats == null ) return null ;
29+ const { rows_last_24_hours, total_rows } = stats ;
30+
2731 return h ( 'div.page-header' , [
2832 h ( 'h1' , 'Heatmap' ) ,
2933 h ( Divider ) ,
3034 h ( 'p' , 'This is a heatmap of all the locations where Rockd has been accessed.' ) ,
31- h ( 'p' , 'The blue markers indicate today\'s accesses, while the grey markers indicate accesses from other days.' ) ,
32- ] ) ;
35+ h ( 'p' , [
36+ "The blue markers indicate today's " ,
37+ h ( 'strong' , rows_last_24_hours . toLocaleString ( ) ) ,
38+ " accesses, while the grey markers indicate the total " ,
39+ h ( 'strong' , total_rows . toLocaleString ( ) ) ,
40+ " accesses from all days."
41+ ] )
42+ ] ) ;
3343}
3444
3545function todayStyle ( ) {
0 commit comments