Commit a527b2ed by HaOuiha

Auto stash before merge of "ejectedExpo" and "origin/ejectedExpo"

parent 78757682
......@@ -39,7 +39,8 @@ export default Application;
const createMockData = () => {
// const deviceId = 'iYs6Th9Pkg1vTEDIyPa5';
const deviceId = '8998c7d5-4476-41d9-81c6-9ef2dbac2505';
// const deviceId = '8998c7d5-4476-41d9-81c6-9ef2dbac2505';
const deviceId = '267a494c-a6b6-4b74-a952-82ba8d5db783';
const batch = fireStore.batch();
/*------------------------------*/
......
......@@ -11,7 +11,7 @@ class SettingScreen extends React.Component {
static navigationOptions = ({ navigation }) => ({
title: 'Setting',
headerLeft: (
<TouchableOpacity onPress={() => navigation.navigate('Home')}>
<TouchableOpacity onPress={() => navigation.popToTop()}>
<View style={{ marginLeft: 17 }}>
<Icon name="home" type="SimpleLineIcons" style={{ color: color.white, fontSize: 16 }} />
</View>
......
......@@ -152,15 +152,6 @@ class SmartMeterDetailScreen extends Component {
]}
>
{item.value}
{/* <AnimateNumber
value={item.value}
timing={1}
formatter={val => {
return parseInt(val);
}}
steps={10}
interval={1}
/> */}
<Text
style={[
......@@ -277,7 +268,8 @@ class SmartMeterDetailScreen extends Component {
/>
}
>
{this.renderMainDatailsCard()}
{(this._mcbLinksListMounted || !isLoadingValues) && this.renderMainDatailsCard()}
{(this._mcbLinksListMounted || !isLoadingValues) && (
<FlatList
data={MockData}
renderItem={({ item, index }) => this.renderCards(item, index)}
......@@ -285,6 +277,7 @@ class SmartMeterDetailScreen extends Component {
numColumns={3}
keyExtractor={(item, index) => `DeviceValues${item.name}`}
/>
)}
{isLoadingList && !this._mcbLinksListMounted ? (
<View style={{ marginTop: 20 }}>
<ActivityIndicator color={color.primary} />
......
......@@ -80,13 +80,11 @@ class TimerScreen extends PureComponent {
_isMounted = false;
constructor(props) {
super(props);
// this.props.getTimers();
}
getAllTimersData = () => {
this.setState({ allTimersData: this.props.allTimers });
getAllTimersData = (search, filter) => {
if (search && filter) {
this.props.allTimers.filter(timer => timer.name);
this.setState();
} else this.setState({ allTimersData: this.props.allTimers });
};
setPickerSelectData = () => {
......@@ -201,8 +199,12 @@ class TimerScreen extends PureComponent {
};
componentDidUpdate = (prevProps, prevState) => {
if (prevProps.allTimers !== this.props.allTimers) {
this.getAllTimersData();
if (
prevProps.allTimers !== this.props.allTimers ||
prevState.search !== this.state.search ||
prevState.filter !== this.state.filter
) {
this.getAllTimersData(this.state.search, this.state.filter);
}
if (prevProps.existedMcbLinksData !== this.props.existedMcbLinksData) {
this.setPickerSelectData();
......@@ -230,12 +232,7 @@ class TimerScreen extends PureComponent {
componentDidMount = () => {
this.props.navigation.setParams({
headerRight: (
<TouchableOpacity
onPress={() => {
this.setState({ isAddVisible: true });
// this.refs.modal.open();
}}
>
<TouchableOpacity onPress={() => this.setState({ isAddVisible: true })}>
<View style={{ marginRight: 17 }}>
<Icon name="ios-add" style={{ color: color.white }} />
</View>
......
......@@ -6186,6 +6186,11 @@ react-native-safe-area-view@^0.14.1:
dependencies:
debounce "^1.2.0"
react-native-skeleton-loader@^1.0.3:
version "1.0.3"
resolved "https://registry.yarnpkg.com/react-native-skeleton-loader/-/react-native-skeleton-loader-1.0.3.tgz#93fa1da5bc1cd73b862616695f44d383aeb0958a"
integrity sha512-rBLkfLkWDfKfJ5TPfX1wed5iaOsMYtv9zopjtxM8y11nq2J/KZfNKzcXNaSc42ncsjZD9HCqlEXTxYPiAD3IGQ==
react-native-status-bar-height@^2.2.0:
version "2.3.1"
resolved "https://registry.yarnpkg.com/react-native-status-bar-height/-/react-native-status-bar-height-2.3.1.tgz#b92ce9112c2367290847ac11284d9d84a6330169"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment