Rename getRandomElement function to getRandomItem
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
<script lang="ts">
|
||||
import { onMount, onDestroy, getContext } from 'svelte'
|
||||
import { getPosition, getRandomElement } from '$utils/functions'
|
||||
import { getPosition, getRandomItem } from '$utils/functions'
|
||||
|
||||
export let type: string = undefined
|
||||
export let autoRotate: boolean = true
|
||||
@@ -18,7 +18,7 @@
|
||||
$: globeResolution = innerWidth > 1440 && window.devicePixelRatio > 1 ? '4k' : '2k'
|
||||
|
||||
const { continents, locations } = getContext('global')
|
||||
const randomContinent = getRandomElement(continents.filter((cont: any) => cont.countries))
|
||||
const randomContinent = getRandomItem(continents.filter((cont: any) => cont.countries))
|
||||
const markers = locations.map(({ name, slug, country, globe_close: isClose, coordinates: { coordinates }}: any) => ({
|
||||
name,
|
||||
slug,
|
||||
|
||||
Reference in New Issue
Block a user