File tree Expand file tree Collapse file tree 2 files changed +20
-3
lines changed
Expand file tree Collapse file tree 2 files changed +20
-3
lines changed Original file line number Diff line number Diff line change @@ -22,7 +22,6 @@ export function StratPage({ show }) {
2222 const [ lastID , setLastID ] = useState ( startingID ) ;
2323 const [ data , setData ] = useState ( res ) ;
2424 const pageSize = 20 ;
25- const firstLoad = useRef ( true ) ;
2625
2726 const strat_name_vars = {
2827 title : "Strat Names" ,
@@ -90,7 +89,14 @@ export function StratPage({ show }) {
9089 h ( "div.header-description" , [
9190 h ( Card ,
9291 {
93- className : ! showConcepts ? "selected" : "" ,
92+ className : ! showConcepts ? "selected" : "unselected" ,
93+ onClick : ( ) => {
94+ if ( showConcepts ) {
95+ setShowConcepts ( false ) ;
96+ setLastID ( 0 ) ;
97+ setData ( [ ] ) ;
98+ }
99+ }
94100 } ,
95101 [
96102 h ( "strong" , "Strat Names: " ) ,
@@ -99,7 +105,14 @@ export function StratPage({ show }) {
99105 ) ,
100106 h ( Card ,
101107 {
102- className : showConcepts ? "selected" : "" ,
108+ className : showConcepts ? "selected" : "unselected" ,
109+ onClick : ( ) => {
110+ if ( ! showConcepts ) {
111+ setShowConcepts ( true ) ;
112+ setLastID ( 0 ) ;
113+ setData ( [ ] ) ;
114+ }
115+ }
103116 } ,
104117 [
105118 h ( "strong" , "Strat Concepts: " ) ,
Original file line number Diff line number Diff line change 8484 background-color : var (--secondary-background ) !important ;
8585 }
8686
87+ .unselected {
88+ cursor : pointer ;
89+ }
90+
8791 p {
8892 display : flex ;
8993 align-items : flex-end ;
You can’t perform that action at this time.
0 commit comments