Browse Source

Do not show retry button on token error

Arnaud Vergnet 6 months ago
parent
commit
b289a85b8a
1 changed files with 9 additions and 5 deletions
  1. 9
    5
      src/components/Screens/WebSectionList.tsx

+ 9
- 5
src/components/Screens/WebSectionList.tsx View File

@@ -141,11 +141,15 @@ function WebSectionList<ItemT, RawData>(props: Props<ItemT, RawData>) {
141 141
             <ErrorView
142 142
               status={status}
143 143
               code={code}
144
-              button={{
145
-                icon: 'refresh',
146
-                text: i18n.t('general.retry'),
147
-                onPress: () => refreshData(),
148
-              }}
144
+              button={
145
+                code !== API_REQUEST_CODES.BAD_TOKEN
146
+                  ? {
147
+                      icon: 'refresh',
148
+                      text: i18n.t('general.retry'),
149
+                      onPress: () => refreshData(),
150
+                    }
151
+                  : undefined
152
+              }
149 153
             />
150 154
           )
151 155
         }

Loading…
Cancel
Save