fix: missing previous data throwing error

This commit is contained in:
Christel Westerberg
2024-05-23 14:10:11 +02:00
parent e00da4278d
commit 4d7207ec9a
2 changed files with 1 additions and 5 deletions

View File

@@ -13,7 +13,7 @@ export default function ShowMoreButton({
<Button
disabled={disabled}
intent="primary"
theme="secondaryDark"
theme="primaryDark"
type="button"
onClick={loadMoreData}
>

View File

@@ -107,10 +107,6 @@ export const userQueryRouter = router({
}
const apiJson = await apiResponse.json()
if (!apiJson.data?.length) {
throw notFound(apiJson)
}
const verifiedData = getStaysSchema.safeParse(apiJson)
if (!verifiedData.success) {
throw internalServerError(verifiedData.error)