From 9e07792fcdd0ba0b7c07a20fe83db54597388e26 Mon Sep 17 00:00:00 2001 From: Adam Soltys Date: Wed, 28 Sep 2022 20:21:58 -0700 Subject: withdraw page and other fixups --- src/lib/utils.js | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/lib/utils.js') diff --git a/src/lib/utils.js b/src/lib/utils.js index df621c4b..61e2ddac 100644 --- a/src/lib/utils.js +++ b/src/lib/utils.js @@ -1,6 +1,7 @@ import cookie from 'cookie'; import { browser } from '$app/environment'; import { toast } from '@zerodevx/svelte-toast'; +import { goto } from '$app/navigation'; export function scroll(section) { section.scrollIntoView({ behavior: 'smooth' }); @@ -144,3 +145,7 @@ export const toggleFullscreen = (el) => : el.requestFullscreen().catch(console.log); export const sats = 100000000; + +export const goBack = () => { + browser && history.go(-1); +}; -- cgit v1.2.3