fix admin exit not redirecting, my posts crash, add error boundary

This commit is contained in:
2026-03-21 20:19:06 +02:00
parent acc71217a8
commit 5a2d26f62f
2 changed files with 32 additions and 10 deletions

View File

@@ -41,8 +41,8 @@ export default function MySubmissions() {
const [loading, setLoading] = useState(true)
useEffect(() => {
api.get<Post[]>('/me/posts')
.then(setPosts)
api.get<{ posts: Post[] }>('/me/posts')
.then((r) => setPosts(r.posts ?? []))
.catch(() => {})
.finally(() => setLoading(false))
}, [])