Skip to content

Commit 686efe7

Browse files
committed
fix: type errors
1 parent b021f31 commit 686efe7

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

apps/mobile/src/lib/api-fetch.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ export const apiClient = hc<AppType>(getApiUrl(), {
6060
},
6161
})
6262

63-
export const getBizFetchErrorMessage = (error: unknown) => {
63+
export const getBizFetchErrorMessage = (error: Error) => {
6464
if (error instanceof FetchError && error.response) {
6565
try {
6666
const data = JSON.parse(error.response._data)

apps/mobile/src/modules/feed-drawer/header.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ export const ViewHeaderComponent = ({
2626
style={{ paddingTop: insets.top }}
2727
>
2828
<BlurEffect />
29-
<Text className="text-text my-4 text-2xl font-bold">{viewDef.name}</Text>
29+
<Text className="text-text my-4 text-2xl font-bold">{viewDef?.name}</Text>
3030
<SortActionButton />
3131
</View>
3232
)

apps/mobile/src/modules/settings/routes/Data.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ export const DataScreen = () => {
102102
`Import successful, ${successfulItems.length} feeds were imported, ${conflictItems.length} feeds were already subscribed, and ${parsedErrorItems.length} feeds failed to import.`,
103103
)
104104
} catch (error) {
105-
const bizError = getBizFetchErrorMessage(error)
105+
const bizError = getBizFetchErrorMessage(error as Error)
106106
toast.error(`Import failed${bizError ? `: ${bizError}` : ""}`)
107107
console.error(error)
108108
}

0 commit comments

Comments
 (0)