Browse Source

Remove useless button in proxiwash modal

Arnaud Vergnet 3 years ago
parent
commit
5d65d72418
3 changed files with 2 additions and 8 deletions
  1. 0
    1
      locales/en.json
  2. 0
    1
      locales/fr.json
  3. 2
    6
      src/screens/Proxiwash/ProxiwashScreen.tsx

+ 0
- 1
locales/en.json View File

@@ -70,7 +70,6 @@
70 70
       "modal": {
71 71
         "enableNotifications": "Notify me",
72 72
         "disableNotifications": "Stop notifications",
73
-        "ok": "OK",
74 73
         "cancel": "Cancel",
75 74
         "finished": "This machine is finished. If you started it, you can get back your laundry.",
76 75
         "ready": "This machine is empty and ready to use.",

+ 0
- 1
locales/fr.json View File

@@ -70,7 +70,6 @@
70 70
       "modal": {
71 71
         "enableNotifications": "Me Notifier",
72 72
         "disableNotifications": "Désactiver les  notifications",
73
-        "ok": "OK",
74 73
         "cancel": "Annuler",
75 74
         "finished": "Cette machine est terminée. Si tu l'as démarrée, tu peux récupérer ton linge.",
76 75
         "ready": "Cette machine est vide et prête à être utilisée.",

+ 2
- 6
src/screens/Proxiwash/ProxiwashScreen.tsx View File

@@ -200,11 +200,7 @@ class ProxiwashScreen extends React.Component<PropsType, StateType> {
200 200
    */
201 201
   getModalContent(title: string, item: ProxiwashMachineType, isDryer: boolean) {
202 202
     const {props, state} = this;
203
-    let button: {text: string; icon: string; onPress: () => void} = {
204
-      text: i18n.t('screens.proxiwash.modal.ok'),
205
-      icon: '',
206
-      onPress: () => undefined,
207
-    };
203
+    let button: {text: string; icon: string; onPress: () => void} | undefined;
208 204
     let message = this.modalStateStrings[item.state];
209 205
     const onPress = () => this.onSetupNotificationsPress(item);
210 206
     if (item.state === MachineStates.RUNNING) {
@@ -247,7 +243,7 @@ class ProxiwashScreen extends React.Component<PropsType, StateType> {
247 243
           <Text>{message}</Text>
248 244
         </Card.Content>
249 245
 
250
-        {button.onPress ? (
246
+        {button ? (
251 247
           <Card.Actions>
252 248
             <Button
253 249
               icon={button.icon}

Loading…
Cancel
Save