Skip to content

Commit

Permalink
fix: type errors
Browse files Browse the repository at this point in the history
  • Loading branch information
DIYgod committed Jan 25, 2025
1 parent b021f31 commit 686efe7
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion apps/mobile/src/lib/api-fetch.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ export const apiClient = hc<AppType>(getApiUrl(), {
},
})

export const getBizFetchErrorMessage = (error: unknown) => {
export const getBizFetchErrorMessage = (error: Error) => {
if (error instanceof FetchError && error.response) {
try {
const data = JSON.parse(error.response._data)
Expand Down
2 changes: 1 addition & 1 deletion apps/mobile/src/modules/feed-drawer/header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ export const ViewHeaderComponent = ({
style={{ paddingTop: insets.top }}
>
<BlurEffect />
<Text className="text-text my-4 text-2xl font-bold">{viewDef.name}</Text>
<Text className="text-text my-4 text-2xl font-bold">{viewDef?.name}</Text>
<SortActionButton />
</View>
)
Expand Down
2 changes: 1 addition & 1 deletion apps/mobile/src/modules/settings/routes/Data.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ export const DataScreen = () => {
`Import successful, ${successfulItems.length} feeds were imported, ${conflictItems.length} feeds were already subscribed, and ${parsedErrorItems.length} feeds failed to import.`,
)
} catch (error) {
const bizError = getBizFetchErrorMessage(error)
const bizError = getBizFetchErrorMessage(error as Error)
toast.error(`Import failed${bizError ? `: ${bizError}` : ""}`)
console.error(error)
}
Expand Down

0 comments on commit 686efe7

Please sign in to comment.