feat: add warning message when login expired

This commit is contained in:
Xyphyn committed 2023-09-26 19:01:42 -07:00
1 parent 24fc427c2a
commit 497496f92a
2 files changed
+7 -1

No files matched your search

+6
View File
@@ -87,6 +87,12 @@ profile.subscribe(async (p) => {
instance.set(p.instance)
// fetch the user because p.user is undefined
const user = await userFromJwt(p.jwt, p.instance)
if (!user?.user)
toast({
content: 'Your login has expired. Re-login to fix this issue.',
type: 'warning',
})
site.set(user?.site)
profile.update(() => ({