mirror of
https://github.com/luxfi/explore.git
synced 2026-09-24 00:28:18 +00:00
set cookie expiration time
This commit is contained in:
committed by
tom goriunov
parent
8f069f995f
commit
1322414364
@@ -138,7 +138,7 @@ export function RewardsContextProvider({ children }: Props) {
|
||||
// Save the API token to cookies and state
|
||||
const saveApiToken = useCallback((token: string | undefined) => {
|
||||
if (token) {
|
||||
cookies.set(cookies.NAMES.REWARDS_API_TOKEN, token);
|
||||
cookies.set(cookies.NAMES.REWARDS_API_TOKEN, token, { expires: 365 });
|
||||
} else {
|
||||
cookies.remove(cookies.NAMES.REWARDS_API_TOKEN);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user