aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/utils.js
diff options
context:
space:
mode:
authorAdam Soltys <[email protected]>2022-10-03 23:13:49 -0700
committerAdam Soltys <[email protected]>2022-10-03 23:13:49 -0700
commit63f1a6780bab85ebb48ca1fc142cc6beaf772faa (patch)
treeb498ac8dd1a8ac5ffd517e6a8050399d9d7a86a1 /src/lib/utils.js
parent8906099f391acf19f7b8eb91527b027cedd65b5e (diff)
downloadcoinos-ui-63f1a6780bab85ebb48ca1fc142cc6beaf772faa.tar.gz
coinos-ui-63f1a6780bab85ebb48ca1fc142cc6beaf772faa.zip
refactoring
Diffstat (limited to 'src/lib/utils.js')
-rw-r--r--src/lib/utils.js8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/lib/utils.js b/src/lib/utils.js
index a7d0adaa..a4c77d58 100644
--- a/src/lib/utils.js
+++ b/src/lib/utils.js
@@ -109,11 +109,14 @@ export const info = (m) => {
export const login = async (user, cookies) => {
let maxAge = 30 * 24 * 60 * 60;
let { token } = await post('/login', user);
+ console.log('logged in', token);
let expires = new Date();
expires.setSeconds(expires.getSeconds() + maxAge);
+ console.log('cs');
cookies.set('token', token, { path: '/' });
+ console.log('bs');
};
export const auth = (cookies) => ({ authorization: `Bearer ${cookies.get('token')}` });
@@ -128,11 +131,6 @@ export const f = (s, currency) =>
export const s = (s) => new Intl.NumberFormat('en-US', { maximumFractionDigits: 0 }).format(s);
-export const toggleFullscreen = (el) =>
- document.fullscreenElement
- ? document.exitFullscreen()
- : el.requestFullscreen().catch(console.log);
-
export const sats = 100000000;
export const back = () => {