Add a button to open proxiwash in the browser #14

Merged
vergnet merged 4 commits from :btn-proxiwash into master 2021-07-06 19:01:12 +02:00
Showing only changes of commit b127cca068 - Show all commits

View file

@ -19,6 +19,7 @@
import React, { useLayoutEffect, useRef, useState } from 'react'; import React, { useLayoutEffect, useRef, useState } from 'react';
import { import {
Linking,
SectionListData, SectionListData,
SectionListRenderItemInfo, SectionListRenderItemInfo,
StyleSheet, StyleSheet,
@ -153,6 +154,11 @@ function ProxiwashScreen() {
navigation.setOptions({ navigation.setOptions({
headerRight: () => ( headerRight: () => (
<MaterialHeaderButtons> <MaterialHeaderButtons>
<Item
title={'web'}
iconName={'information'}
onPress={() => Linking.openURL(ProxiwashConstants[selectedWash].webPageUrl)}
/>
<Item <Item
title={'information'} title={'information'}
iconName={'information'} iconName={'information'}
@ -161,7 +167,7 @@ function ProxiwashScreen() {
</MaterialHeaderButtons> </MaterialHeaderButtons>
), ),
}); });
}, [navigation]); }, [navigation, selectedWash]);
/** /**
* Callback used when the user clicks on enable notifications for a machine * Callback used when the user clicks on enable notifications for a machine