Skip to content

Commit 46b368a

Browse files
committed
fix cursor
1 parent 52e6594 commit 46b368a

File tree

2 files changed

+20
-3
lines changed

2 files changed

+20
-3
lines changed

pages/lex/strat-names/+Page.client.ts

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff 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: "),

pages/lex/strat-names/main.module.scss

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,10 @@
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;

0 commit comments

Comments
 (0)