Skip to content

Commit

Permalink
Extend cookie time to solve issue with external redirect
Browse files Browse the repository at this point in the history
  • Loading branch information
farhatahmad committed Dec 16, 2024
1 parent 25ba321 commit 02e7497
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/javascript/components/rooms/room/join/JoinCard.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ export default function JoinCard() {

useEffect(() => { // set cookie to return to if needed
const date = new Date();
date.setTime(date.getTime() + (60 * 1000)); // expire the cookie in 1min
date.setTime(date.getTime() + (60 * 10000)); // expire the cookie in 10min
document.cookie = `location=${path};path=/;expires=${date.toGMTString()}`;

return () => { // delete redirect location when unmounting
Expand Down

0 comments on commit 02e7497

Please sign in to comment.