mirror of
https://github.com/aljazceru/landscape-template.git
synced 2026-01-08 17:04:29 +01:00
refactor: migrate to jwt sessions instead of store sessions
This commit is contained in:
@@ -57,7 +57,18 @@ export default function LoginPage() {
|
||||
}, [])
|
||||
|
||||
const startPolling = () => {
|
||||
meQuery.startPolling(3000)
|
||||
// meQuery.startPolling(3000)
|
||||
const interval = setInterval(() => {
|
||||
fetch(CONSTS.apiEndpoint + '/is-logged-in', {
|
||||
credentials: 'include'
|
||||
}).then(data => data.json())
|
||||
.then(data => {
|
||||
if (data.logged_in) {
|
||||
clearInterval(interval)
|
||||
meQuery.refetch();
|
||||
}
|
||||
})
|
||||
}, 2000)
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user