test
parent
c638dcbaad
commit
0fb6bec94c
|
@ -14,6 +14,10 @@ export default function StoreCalendar() {
|
|||
const [isRequesting, setIsRequesting] = useState(true);
|
||||
|
||||
useEffect(() => {
|
||||
// delete session cookie
|
||||
|
||||
document.cookie = `session=; path=/; expires=Thu, 01 Jan 1970 00:00:01 GMT;`;
|
||||
|
||||
myFetch("/calendar/settings", "GET")
|
||||
.then((res) => {
|
||||
console.log(res);
|
||||
|
@ -40,9 +44,7 @@ export default function StoreCalendar() {
|
|||
<Button
|
||||
//href={`${Constants.API_ADDRESS}/calendar/auth/google`}
|
||||
onClick={() => {
|
||||
document.cookie = `session=${getUserSessionFromLocalStorage()}; max-age=${
|
||||
5 * 60
|
||||
}; path=/;`;
|
||||
document.cookie = `session=${getUserSessionFromLocalStorage()}; path=/;`;
|
||||
|
||||
window.location.href = `${Constants.API_ADDRESS}/calendar/auth/google`;
|
||||
}}
|
||||
|
|
Loading…
Reference in New Issue