Skip to content

Commit 2cefb83

Browse files
committed
merged correctly
2 parents f3e3159 + cb23841 commit 2cefb83

File tree

2 files changed

+61
-9
lines changed

2 files changed

+61
-9
lines changed

pages/dev/test-site/explore/+Page.client.ts

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ function FeatureDetails() {
140140
}, [bounds]);
141141
}
142142

143-
if (result == null) return h(Spinner);
143+
if (result == null) return h("div.checkin-container",Spinner);
144144
result = result.success.data;
145145
console.log("result:",result)
146146

@@ -240,7 +240,6 @@ function WeaverMap({
240240
const style = useMapStyle(type, mapboxToken);
241241

242242
const [featuredCheckins, setFeaturedCheckin] = useState(h(Spinner));
243-
244243
// overlay
245244
const [isOpenSelected, setOpenSelected] = useState(true);
246245

@@ -292,7 +291,6 @@ function WeaverMap({
292291
]);
293292
}
294293

295-
296294
if(style == null) return null;
297295

298296
return h(
@@ -302,7 +300,6 @@ function WeaverMap({
302300
h(
303301
MapAreaContainer,
304302
{
305-
detailPanel: detailElement,
306303
contextPanelOpen: isOpen,
307304
},
308305
[
@@ -328,15 +325,15 @@ function getSelectedCheckins(result) {
328325

329326
// Selected checkin
330327
if (result == null) {
331-
return h(Spinner);
328+
return null;
332329
} else {
333330
result = result.success.data;
334331
checkins = createCheckins(result, mapRef, false);
335332

336333
if (checkins.length > 0) {
337334
return h("div", {className: 'checkin-container'}, checkins);
338335
} else {
339-
return h('h1', { className: 'no-checkins' }, "No Checkin(s) Selected");
336+
return null;
340337
}
341338
}
342339
}

pages/dev/test-site/explore/main.styl

Lines changed: 58 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -133,8 +133,63 @@ h3,h4,p
133133
border-radius: 4px;
134134
width 100%
135135

136-
.no-checkins
137-
color black
136+
.sidebox
137+
position absolute
138+
z-index 1000
139+
height 100vh
140+
width 30%
141+
top 0
142+
left 0
143+
background rgba(255, 255, 255, 0.8)
144+
145+
.title
146+
color black
147+
position fixed
148+
width 30%
149+
background rgba(255, 255, 255, 0.85)
150+
margin 0
151+
height 10vh
152+
display flex
153+
flex-direction column
154+
align-items center
155+
justify-content center
156+
157+
h1
158+
margin-bottom 0
159+
margin-top 0
160+
161+
.close-btn
162+
position absolute
163+
top 10px
164+
right 10px
165+
background-color #333
166+
color white
167+
border none
168+
border-radius 50%
169+
width 30px
170+
height 30px
171+
display flex
172+
justify-content center
173+
align-items center
174+
font-size 15px
175+
cursor pointer
176+
box-shadow 0 4px 8px rgba(0, 0, 0, 0.2)
177+
transition background-color 0.3s, box-shadow 0.3s
178+
179+
.close-btn:hover
180+
background-color #555
181+
box-shadow 0 6px 12px rgba(0, 0, 0, 0.3)
182+
183+
.marker
184+
height 7vh
185+
display grid
186+
margin auto
187+
margin-right 10px
188+
189+
.details-image
190+
width 40px
191+
margin-left 10px
192+
margin-top 4px
138193

139194
.checkin-footer
140195
display flex
@@ -216,4 +271,4 @@ h3,h4,p
216271

217272
.close-btn:hover
218273
background-color #555
219-
box-shadow 0 6px 12px rgba(0, 0, 0, 0.3)
274+
box-shadow 0 6px 12px rgba(0, 0, 0, 0.3)

0 commit comments

Comments
 (0)