Skip to content

Commit

Permalink
client/organisation: remember last visited organisation for 30 days
Browse files Browse the repository at this point in the history
  • Loading branch information
magarpratik authored and frankie567 committed Dec 18, 2024
1 parent 0a56c21 commit 0c8788c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion clients/apps/web/src/utils/cookies.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ const lastVisitedOrg = 'last_visited_org'

export const setLastVisitedOrg = (
organization: string,
maxAge: number = 86400, // Expires in 1 day
maxAge: number = 30 * 86400, // Expires in 30 days
) => {
document.cookie = `${lastVisitedOrg}=${organization}; max-age=${maxAge}; path=/`
}
Expand Down

0 comments on commit 0c8788c

Please sign in to comment.