Commit 9b247064 authored by timel's avatar timel

feat: set cookie expires to 2 months

parent 50217ee8
......@@ -11,5 +11,7 @@ export const getCookie = <T>(key: CookieKeys) => {
};
export const setCookie = <T>(key: CookieKeys, value: T) => {
cookies.set(key, value);
cookies.set(key, value, {
expires: new Date(Date.now() + 1000 * 60 * 60 * 24 * 60), // 两个月的cookie,应该很充裕
});
};
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment