manifests

This commit is contained in:
2023-09-27 22:27:52 +01:00
parent 8870c1f7b8
commit e9a1653c4e
17 changed files with 683 additions and 10 deletions

View File

@@ -10,7 +10,7 @@ import LoadingBar from '../components/LoadingBar'
import { useAppSelector } from '../app/hooks'
import { useGetPanelPostQuery } from '../app/api/posts'
import type { PanelContext } from '../components/PanelLayout'
import type { ErrorResponse } from '../app/types/api'
import type { QueryError, ErrorResponse } from '../app/types/api'
import type { Comment } from '../app/types/common'
type PanelPostPageParams = {
@@ -37,8 +37,8 @@ function PanelPostPage() {
} else if (!data) {
if (!error) {
throw Error('Unknown error occured')
} else if ('data' in error) {
const errResponse = error.data as ErrorResponse
} else if ((error as QueryError).data) {
const errResponse = (error as QueryError).data as ErrorResponse
if (errResponse.msg) {
throw Error(errResponse.msg)
} else {