From 5083645eff4fbee332f0c8c90ea90dc3047b9484 Mon Sep 17 00:00:00 2001 From: Justin Hynes Date: Mon, 4 Mar 2024 11:14:27 -0500 Subject: [PATCH] refactor: remove unused `cookies.js` util file (#296) --- src/utils/cookies.js | 16 ---------------- 1 file changed, 16 deletions(-) delete mode 100644 src/utils/cookies.js diff --git a/src/utils/cookies.js b/src/utils/cookies.js deleted file mode 100644 index 6246cb8e..00000000 --- a/src/utils/cookies.js +++ /dev/null @@ -1,16 +0,0 @@ -import Cookies from 'universal-cookie'; -import { configuration } from '../config'; - -export function setCookie(cookieName, cookieValue, cookieExpiry) { - const cookies = new Cookies(); - const options = { domain: configuration.SESSION_COOKIE_DOMAIN, path: '/' }; - if (cookieExpiry) { - options.expires = new Date(Date.now() + cookieExpiry * 864e5); - } - cookies.set(cookieName, cookieValue, options); -} - -export function getCookie(cookieName) { - const cookies = new Cookies(); - return cookies.get(cookieName); -}