Remove useless button in proxiwash modal
This commit is contained in:
parent
b692b6e7f6
commit
5d65d72418
3 changed files with 2 additions and 8 deletions
|
@ -70,7 +70,6 @@
|
|||
"modal": {
|
||||
"enableNotifications": "Notify me",
|
||||
"disableNotifications": "Stop notifications",
|
||||
"ok": "OK",
|
||||
"cancel": "Cancel",
|
||||
"finished": "This machine is finished. If you started it, you can get back your laundry.",
|
||||
"ready": "This machine is empty and ready to use.",
|
||||
|
|
|
@ -70,7 +70,6 @@
|
|||
"modal": {
|
||||
"enableNotifications": "Me Notifier",
|
||||
"disableNotifications": "Désactiver les notifications",
|
||||
"ok": "OK",
|
||||
"cancel": "Annuler",
|
||||
"finished": "Cette machine est terminée. Si tu l'as démarrée, tu peux récupérer ton linge.",
|
||||
"ready": "Cette machine est vide et prête à être utilisée.",
|
||||
|
|
|
@ -200,11 +200,7 @@ class ProxiwashScreen extends React.Component<PropsType, StateType> {
|
|||
*/
|
||||
getModalContent(title: string, item: ProxiwashMachineType, isDryer: boolean) {
|
||||
const {props, state} = this;
|
||||
let button: {text: string; icon: string; onPress: () => void} = {
|
||||
text: i18n.t('screens.proxiwash.modal.ok'),
|
||||
icon: '',
|
||||
onPress: () => undefined,
|
||||
};
|
||||
let button: {text: string; icon: string; onPress: () => void} | undefined;
|
||||
let message = this.modalStateStrings[item.state];
|
||||
const onPress = () => this.onSetupNotificationsPress(item);
|
||||
if (item.state === MachineStates.RUNNING) {
|
||||
|
@ -247,7 +243,7 @@ class ProxiwashScreen extends React.Component<PropsType, StateType> {
|
|||
<Text>{message}</Text>
|
||||
</Card.Content>
|
||||
|
||||
{button.onPress ? (
|
||||
{button ? (
|
||||
<Card.Actions>
|
||||
<Button
|
||||
icon={button.icon}
|
||||
|
|
Loading…
Reference in a new issue