Skip to content

Commit 43a8097

Browse files
committed
format styling
1 parent 46b368a commit 43a8097

File tree

3 files changed

+22
-17
lines changed

3 files changed

+22
-17
lines changed

pages/lex/strat-name-concepts/+data.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@ export async function data() {
66
last_id: 0,
77
});
88
return { res };
9-
}
9+
}

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

Lines changed: 20 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,9 @@ export function Page() {
1515
export function StratPage({ show }) {
1616
const { res } = useData();
1717
console.log("res", res);
18-
const startingID = show ? res[res?.length - 1]?.concept_id : res[res?.length - 1]?.strat_name_id;
18+
const startingID = show
19+
? res[res?.length - 1]?.concept_id
20+
: res[res?.length - 1]?.strat_name_id;
1921

2022
const [input, setInput] = useState("");
2123
const [showConcepts, setShowConcepts] = useState(show ?? false);
@@ -43,8 +45,8 @@ export function StratPage({ show }) {
4345

4446
const result = useStratData(lastID, input, pageSize, data_route, like);
4547

46-
console.log(lastID)
47-
console.log("data", data)
48+
console.log(lastID);
49+
console.log("data", data);
4850

4951
const prevInputRef = useRef(input);
5052
const prevShowConceptsRef = useRef(showConcepts);
@@ -64,16 +66,17 @@ export function StratPage({ show }) {
6466
}
6567
}, [input, showConcepts]);
6668

67-
6869
useEffect(() => {
6970
if (
70-
result &&
71-
data[data.length - 1]?.[showConcepts ? "concept_id" : "strat_name_id"] !== result[result.length - 1]?.[showConcepts ? "concept_id" : "strat_name_id"]
71+
result &&
72+
data[data.length - 1]?.[showConcepts ? "concept_id" : "strat_name_id"] !==
73+
result[result.length - 1]?.[
74+
showConcepts ? "concept_id" : "strat_name_id"
75+
]
7276
) {
7377
setData((prevData) => {
74-
return [...prevData, ...result];
75-
}
76-
);
78+
return [...prevData, ...result];
79+
});
7780
}
7881
}, [result]);
7982

@@ -87,7 +90,8 @@ export function StratPage({ show }) {
8790
h(StickyHeader, { className: "header" }, [
8891
h(PageBreadcrumbs, { title }),
8992
h("div.header-description", [
90-
h(Card,
93+
h(
94+
Card,
9195
{
9296
className: !showConcepts ? "selected" : "unselected",
9397
onClick: () => {
@@ -96,14 +100,15 @@ export function StratPage({ show }) {
96100
setLastID(0);
97101
setData([]);
98102
}
99-
}
103+
},
100104
},
101105
[
102106
h("strong", "Strat Names: "),
103107
h("span", "names of rock units, organized hierarchically"),
104108
]
105-
),
106-
h(Card,
109+
),
110+
h(
111+
Card,
107112
{
108113
className: showConcepts ? "selected" : "unselected",
109114
onClick: () => {
@@ -112,8 +117,8 @@ export function StratPage({ show }) {
112117
setLastID(0);
113118
setData([]);
114119
}
115-
}
116-
},
120+
},
121+
},
117122
[
118123
h("strong", "Strat Concepts: "),
119124
h(

pages/lex/strat-names/+data.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@ export async function data() {
66
last_id: 0,
77
});
88
return { res };
9-
}
9+
}

0 commit comments

Comments
 (0)