Reorganise functions, Use custom Format Date/Relative Time over dayjs

This commit is contained in:
2020-03-06 14:14:17 +01:00
parent 46488146d0
commit adf2563eb8
11 changed files with 128 additions and 72 deletions

View File

@@ -3,10 +3,10 @@
import { flip } from 'svelte/animate'
import { crossfadeReceive, crossfadeSend } from '../utils/animations'
import { locations, countries, continents } from '../utils/store'
import * as fn from '../utils/functions'
// Dependencies
import AOS from 'aos'
import { throttle } from '../utils/functions'
// Components
import Button from '../atoms/Button'
@@ -25,7 +25,7 @@
// Filter by continent
// Detects if click difference if too short with a throttled function
const toggleContinents = fn.throttle((event, continent) => {
const toggleContinents = throttle((event, continent) => {
continentsFiltered = (!continent) ? [...continentsToDisplay] : [continent]
}, transitionDuration)