fix admin exit not redirecting, my posts crash, add error boundary
This commit is contained in:
@@ -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))
|
||||
}, [])
|
||||
|
||||
Reference in New Issue
Block a user