Skip to content

Commit

Permalink
Fix: solves the issue #41
Browse files Browse the repository at this point in the history
Signed-off-by: guacamole <gunjanwalecha@gmail.com>
  • Loading branch information
guacamole authored and jay-dee7 committed Dec 22, 2022
1 parent c662889 commit 3024702
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 1 deletion.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
"svelte-forms": "^2.3.0",
"svelte-popperjs": "^1.2.8",
"svelte-preprocess": "^4.10.7",
"svelte-scrollto": "^0.2.0",
"tailwindcss": "^3.1.8",
"tslib": "^2.4.0",
"typescript": "^4.7.4",
Expand Down
7 changes: 7 additions & 0 deletions src/lib/pagination.svelte
Original file line number Diff line number Diff line change
@@ -1,12 +1,19 @@
<script lang="ts">
import { ArrowRightIcon, ArrowLeftIcon } from '$lib/icons';
import { getContext } from 'svelte';
import * as animateScroll from 'svelte-scrollto';
let activePage = 0;
const fetchPageData = getContext<Function>('fetchPageData');
export let pages: number = 0;
animateScroll.setGlobalOptions({
duration: 0,
easing: () => {}
});
const setActivePage = async (offset: number) => {
animateScroll.scrollToTop();
if (offset > pages - 1 || offset < 0) {
return;
}
Expand Down
9 changes: 8 additions & 1 deletion yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2746,12 +2746,19 @@ svelte-preprocess@^4.0.0, svelte-preprocess@^4.10.7:
sorcery "^0.10.0"
strip-indent "^3.0.0"

svelte-scrollto@^0.2.0:
version "0.2.0"
resolved "https://registry.yarnpkg.com/svelte-scrollto/-/svelte-scrollto-0.2.0.tgz#a1da47876466796bba4533a4346537f752f01680"
integrity sha512-l4K2E4jr6dXCODtZDCkpp/TzknVVoq8gecHM0UOOmihvLosczdyLuyDUhZ+U2HkhLWi7nnimuOstZSFKtXSpmA==
dependencies:
svelte "3.x"

svelte-steps@^2.3.5:
version "2.3.5"
resolved "https://registry.yarnpkg.com/svelte-steps/-/svelte-steps-2.3.5.tgz#ef6b24eab6573e800d72f48c1ea3157a92d97305"
integrity sha512-d490ClMkS/vOLUX56GjIR60rbRDjJ/eE4NGO31RIdkGruBm/wi9MWfxHG4xQmIM68hbAbV2lSOksoO+SVbtq/g==

svelte@^3.49.0:
svelte@3.x, svelte@^3.49.0:
version "3.50.1"
resolved "https://registry.yarnpkg.com/svelte/-/svelte-3.50.1.tgz#b35fbc5e79ddd71e8bb27c3149ee6ff903841239"
integrity sha512-bS4odcsdj5D5jEg6riZuMg5NKelzPtmsCbD9RG+8umU03TeNkdWnP6pqbCm0s8UQNBkqk29w/Bdubn3C+HWSwA==
Expand Down

0 comments on commit 3024702

Please sign in to comment.