Skip to content

Commit 6cc4958

Browse files
committed
asdadasfwrgs
1 parent 21c5c70 commit 6cc4958

File tree

2 files changed

+18
-11
lines changed

2 files changed

+18
-11
lines changed

views/user/dashboard.ejs

+15-10
Original file line numberDiff line numberDiff line change
@@ -234,9 +234,12 @@
234234
{ name: "Shannon", score: 1.33 },
235235
{ name: "Luke", score: 0 }
236236
]
237-
setTimeout(function(){
237+
238+
window.onload = setTimeout(function(){
239+
console.log('this works')
238240
alert("Good job on arriving on time and preventing an axe!")
239-
},30*1000)
241+
},5000)
242+
240243
$.ajax({
241244
method: 'POST',
242245
url: 'https://hasura-codeday.herokuapp.com/v1alpha1/graphql',
@@ -254,6 +257,7 @@
254257
score: item.points
255258
})
256259
})
260+
257261
data.data.event.forEach((item) => {
258262
events.push({
259263
name: item.name,
@@ -277,6 +281,14 @@
277281
eventsElement.append(toEventHtml(i.name, i.time, i.location, i.id))
278282
})
279283
}
284+
const html = `<div id="see" style="
285+
width: 100%;
286+
margin: 1rem;
287+
margin-bottom: 1.5rem;
288+
text-align:center;
289+
cursor: pointer;
290+
" ><a href="/user/scoreboard">See all players</a></div>`
291+
scoreboardElement.append(html)
280292
281293
})
282294
function toEventHtml(name, time, location, id) {
@@ -338,14 +350,7 @@
338350
const scoreboardElement = $('#scoreboard-inner')
339351
$('#events-button').click(() => window.location.href = "/event/create")
340352
341-
const html = `<div id="see" style="
342-
width: 100%;
343-
margin: 1rem;
344-
margin-bottom: 1.5rem;
345-
text-align:center;
346-
cursor: pointer;
347-
" ><a href="/user/scoreboard">See all players</a></div>`
348-
scoreboardElement.append(html)
353+
349354
</script>
350355
<script>
351356
let userLocation = { lat: 37.7749, lng: -122.4194 }

views/user/index.ejs

+3-1
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,9 @@
233233
}
234234
}
235235
})
236-
236+
setTimeout(function(){
237+
alert("Good job on arriving on time and preventing an axe!")
238+
},5000)
237239
function toEventHtml(name, time, location, id) {
238240
return `
239241
<a href="/events/${id}">

0 commit comments

Comments
 (0)