Implement logging system
This commit is contained in:
@@ -40,10 +40,8 @@ export const Profile = observer(({navIdx, visible, params}: ScreenParams) => {
|
||||
return
|
||||
}
|
||||
if (hasSetup) {
|
||||
console.log('Updating profile for', params.name)
|
||||
uiState.update()
|
||||
} else {
|
||||
console.log('Fetching profile for', params.name)
|
||||
store.nav.setTitle(navIdx, params.name)
|
||||
uiState.setup().then(() => {
|
||||
if (aborted) return
|
||||
@@ -64,12 +62,19 @@ export const Profile = observer(({navIdx, visible, params}: ScreenParams) => {
|
||||
const onRefresh = () => {
|
||||
uiState
|
||||
.refresh()
|
||||
.catch((err: any) => console.error('Failed to refresh', err))
|
||||
.catch((err: any) =>
|
||||
store.log.error('Failed to refresh user profile', err.toString()),
|
||||
)
|
||||
}
|
||||
const onEndReached = () => {
|
||||
uiState
|
||||
.loadMore()
|
||||
.catch((err: any) => console.error('Failed to load more', err))
|
||||
.catch((err: any) =>
|
||||
store.log.error(
|
||||
'Failed to load more entries in user profile',
|
||||
err.toString(),
|
||||
),
|
||||
)
|
||||
}
|
||||
const onPressTryAgain = () => {
|
||||
uiState.setup()
|
||||
|
||||
Reference in New Issue
Block a user