From 7a234b75b7a0e0be4237888ae5eae92200baccbb Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Martin=20L=C3=B6ffler?= <git@fatalerrorcoded.eu>
Date: Tue, 30 Jun 2020 13:25:20 +0000
Subject: [PATCH] Fixed cookies expiring immediately

---
 components/SignupForm.tsx | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/components/SignupForm.tsx b/components/SignupForm.tsx
index dbdcc1d..99715b4 100644
--- a/components/SignupForm.tsx
+++ b/components/SignupForm.tsx
@@ -39,7 +39,7 @@ export default function SignupForm() {
             if (response.status === 200) {
                 setStatus(Status.Sent);
                 setReferral(response.data.referral);
-                Cookies.set("referral", response.data.referral);
+                Cookies.set("referral", response.data.referral, { expires: 365 });
             } else if (response.status === 400) setStatus(Status.InvalidEmail);
             else setStatus(Status.ServerError);
         }).catch(() => setStatus(Status.ServerError));
-- 
GitLab