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

+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "photon-lemmy",
"version": "1.13.0",
"version": "1.13.1",
"private": true,
"scripts": {
"dev": "vite dev",
+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(() => ({