feat: add warning message when login expired
This commit is contained in:
1 parent
24fc427c2a
commit
497496f92a
2 files changed
+7
-1
No files matched your search
@@ -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(() => ({
|
||||
|
||||
Reference in new issue
Block a user