@@ -7,26 +7,26 @@ import { useState } from "react";
77import { ContentPage } from "~/layouts" ;
88import { Timescale } from "@macrostrat/timescale" ;
99import { titleCase } from "../index" ;
10- import { c } from "vite/dist/node/moduleRunnerTransport.d-CXw_Ws6P" ;
11- import { time } from "console" ;
1210
1311export function Page ( ) {
1412 const [ input , setInput ] = useState ( "" ) ;
1513 const [ age , setAge ] = useState ( [ 0 , 4000 ] ) ;
1614 const [ clickedInterval , setClickedInterval ] = useState ( null ) ;
1715 const res = useAPIResult ( SETTINGS . apiV2Prefix + "/defs/timescales?all" ) ?. success . data ;
16+ /*
1817 const clickedRes = useAPIResult("https://macrostrat.org/api/defs/intervals?name=" + clickedInterval)?.success.data[0];
1918
2019 if (clickedRes) {
2120 const url = "/lex/intervals/" + clickedRes.int_id;
22- window . open ( url , "_blank" )
21+ // window.open(url)
2322 }
23+ */
2424
2525 if ( res == null ) return h ( "div" , "Loading..." ) ;
2626
27- const handleChange = ( event ) => {
27+ const handleChange = ( event ) => {
2828 setInput ( event . target . value . toLowerCase ( ) ) ;
29- }
29+ }
3030
3131 const filtered = res . filter ( ( d ) => {
3232 const name = d . timescale ?. toLowerCase ( ) || "" ;
@@ -44,6 +44,7 @@ export function Page() {
4444 const handleClick = ( timescale ) => {
4545 const name = timescale . target . textContent ;
4646 setClickedInterval ( name ) ;
47+ console . log ( timescale )
4748 console . log ( "interval clicked:" , name ) ;
4849 }
4950
0 commit comments