Skip to content

Commit 47e96fd

Browse files
committed
Use new api route
1 parent e3e9202 commit 47e96fd

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

pages/trip/@id/+data.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { rockdApiURL } from "@macrostrat-web/settings";
33

44
export async function data(pageContext) {
55
const data = await fetch(
6-
`${rockdApiURL}/trips/${pageContext.routeParams.id}`
6+
`${rockdApiURL}/trips/${pageContext.routeParams.id}?simple=true`
77
).then((response) => {
88
if (!response.ok) {
99
throw new Error(`HTTP error! status: ${response.status}`);

src/components/general/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -412,14 +412,14 @@ function Checkin({checkin, mapRef, setInspectPosition, len}) {
412412
}),
413413
h("h3", { className: "likes" }, checkin.likes),
414414
]),
415-
h("div", { className: "observations-container" }, [
415+
h.if(checkin?.observations)("div", { className: "observations-container" }, [
416416
h(Icon, {
417417
className:
418418
"observations-icon " + (isDarkMode ? "icon-dark-mode" : ""),
419419
icon: "camera",
420420
style: { color: "white" },
421421
}),
422-
h("h3", { className: "likes" }, checkin.observations.length),
422+
h("h3", { className: "likes" }, checkin.observations?.length),
423423
]),
424424
h("div", { className: "comments-container" }, [
425425
h(Icon, {

0 commit comments

Comments
 (0)