Skip to content

Commit

Permalink
Set one year expiry for terms cookie
Browse files Browse the repository at this point in the history
  • Loading branch information
marius-mather committed Sep 18, 2024
1 parent f238b89 commit 54c3b4f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion app/_components/TermsModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,9 @@ export default function TermsModal() {
}, [accepted]);

const accept_terms = () => {
setCookie("accepted_terms", "true");
const one_year = new Date();
one_year.setFullYear(one_year.getFullYear() + 1);
setCookie("accepted_terms", "true", { expires: one_year });
setOpen(false);
};

Expand Down

0 comments on commit 54c3b4f

Please sign in to comment.