images
This commit is contained in:
parent
ed5a2222d6
commit
4054b66aa3
|
@ -1,8 +1,6 @@
|
|||
export const getLocationDataFromLatAndLong = async (latitude: number, longitude: number) => {
|
||||
const response = await fetch(`https://nominatim.openstreetmap.org/reverse?lat=${latitude}&lon=${longitude}&format=json`)
|
||||
const data = await response.json()
|
||||
console.log(data);
|
||||
|
||||
const data = await response.json()
|
||||
return {
|
||||
city: data?.address?.town || data?.address?.city || data?.address?.village,
|
||||
state: data?.address?.country,
|
||||
|
|
|
@ -7,16 +7,19 @@
|
|||
const dispatch = createEventDispatcher()
|
||||
|
||||
export let control: 'wrong-firstTime' | 'wrong-secondTime' | 'correct' | 'not-control' | null
|
||||
export let imgSrc
|
||||
export let imgSrc: string = ''
|
||||
export let loading: boolean
|
||||
//
|
||||
</script>
|
||||
|
||||
<div>
|
||||
<div class="wrap">
|
||||
<div class="h-[var(--quizHeader)] w-full flex relative top-0 justify-center items-center">
|
||||
<div class="flex justify-center items-center flex-col flex-wrap gap-3">
|
||||
<span class="title"><slot name="title" /></span>
|
||||
<span style="width: 100%"><Image class="w-full h-[200px]" src={imgSrc} /></span>
|
||||
<div class="wrap mt-2">
|
||||
<div class="w-full flex relative top-0 justify-center items-center">
|
||||
<div class="flex w-full justify-center items-center flex-col flex-wrap gap-3">
|
||||
<span class="title h-min"><slot name="title" /></span>
|
||||
{#if imgSrc}
|
||||
<span style="width: 100%"><Image class="w-full h-[200px]" src={imgSrc} /></span>
|
||||
{/if}
|
||||
</div>
|
||||
</div>
|
||||
<Section style="height: calc(100% - var(--quizHeader)); position: relative">
|
||||
|
|
|
@ -122,7 +122,7 @@
|
|||
{#if view === 'question'}
|
||||
<Layout
|
||||
loading={answerLoading}
|
||||
imgSrc={'gameData.question.thumbnail'}
|
||||
imgSrc={checkPoint.CPImage}
|
||||
on:submit={() => checkAnswer()}
|
||||
on:nextQuestion={() => {
|
||||
if (checkPointType === 'INFO') checkAnswer()
|
||||
|
|
Loading…
Reference in New Issue