@@ -6,10 +6,26 @@ import { ZarrDataset, GetStore } from '@/components/zarr/ZarrLoaderLRU';
66import { useEffect , useMemo } from 'react' ;
77import { PlotArea , Plot , LandingShapes } from '@/components/plots' ;
88import { MainPanel } from '@/components/ui' ;
9- import { Loading , Navbar , Error } from '@/components/ui' ;
9+ import { Loading , Navbar , Error as ErrorComponent } from '@/components/ui' ;
1010import { useGlobalStore , useZarrStore } from '@/utils/GlobalStates' ;
1111import { useShallow } from 'zustand/shallow' ;
1212
13+ async function sendPing ( ) {
14+ const url = "https://www.bgc-jena.mpg.de/~jpoehls/browzarr/visitor_logger.php" ;
15+
16+ try {
17+ const response = await fetch ( url , {
18+ method : "GET" ,
19+ } ) ;
20+
21+ if ( ! response . ok ) {
22+ throw new Error ( `HTTP error! Status: ${ response . status } ` ) ;
23+ }
24+ } catch ( error ) {
25+ console . error ( "Request failed:" , error ) ;
26+ }
27+ }
28+
1329export function LandingHome ( ) {
1430 const {
1531 initStore, timeSeries, variable, plotOn,
@@ -64,12 +80,15 @@ export function LandingHome() {
6480 return ( ) => { isMounted = false ; } ;
6581 } , [ currentStore , setZMeta , setVariables , setTitleDescription ] )
6682
83+ useEffect ( ( ) => {
84+ sendPing ( )
85+ } , [ ] )
6786
6887 return (
6988 < >
7089 < MainPanel />
7190 { variable == 'Default' && < LandingShapes /> }
72- < Error />
91+ < ErrorComponent />
7392 { ! plotOn && < Navbar /> }
7493 < Loading />
7594
0 commit comments