Do not show retry button on token error

This commit is contained in:
Arnaud Vergnet 2021-05-23 15:07:37 +02:00
parent ffa4cfa376
commit b289a85b8a

View file

@ -141,11 +141,15 @@ function WebSectionList<ItemT, RawData>(props: Props<ItemT, RawData>) {
<ErrorView
status={status}
code={code}
button={{
icon: 'refresh',
text: i18n.t('general.retry'),
onPress: () => refreshData(),
}}
button={
code !== API_REQUEST_CODES.BAD_TOKEN
? {
icon: 'refresh',
text: i18n.t('general.retry'),
onPress: () => refreshData(),
}
: undefined
}
/>
)
}