Code clean
- Imports/exports always at top - Sapper template not needing a div to execute - NPM packages updates: @rollup/plugin-commonjs 11.1.0 has a bug about import/exports
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
<script>
|
||||
import { onMount, createEventDispatcher } from 'svelte'
|
||||
import { currentLocation } from 'utils/store'
|
||||
const dispatch = createEventDispatcher()
|
||||
|
||||
// Props
|
||||
export let photos
|
||||
@@ -9,6 +8,7 @@
|
||||
export let photosPerPage
|
||||
|
||||
// Variables
|
||||
const dispatch = createEventDispatcher()
|
||||
let currentIndex = photosPerPage
|
||||
const pagesTotal = Math.ceil(photos.length / photosPerPage)
|
||||
const pagesArray = Array.from({ length: pagesTotal }, (v, k) => k + 1).reverse()
|
||||
|
||||
Reference in New Issue
Block a user