Skip to content
This repository has been archived by the owner on Feb 1, 2022. It is now read-only.

Commit

Permalink
Added message with available shops
Browse files Browse the repository at this point in the history
  • Loading branch information
gersomvg committed Jul 31, 2018
1 parent cdc5d9e commit 2c8ba6b
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .expo/packager-info.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"expoServerPort": 19000,
"packagerPort": 19001,
"packagerPid": 31052,
"packagerPid": 83220,
"expoServerNgrokUrl": null,
"packagerNgrokUrl": null,
"ngrokPid": null
Expand Down
19 changes: 18 additions & 1 deletion src/modules/Product/components/Shops.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
import React from 'react';
import RN from 'react-native';
import PT from 'prop-types';
import { connect } from 'react-redux';

import { Text } from 'common';

@connect(state => ({
shops: state.shops.items,
}))
class Shops extends React.PureComponent {
static propTypes = {
product: PT.object.isRequired,
Expand All @@ -29,7 +33,16 @@ class Shops extends React.PureComponent {

renderShops = () => {
return (
<RN.View style={styles.shops}>{this.props.product.shops.map(this.renderShop)}</RN.View>
<React.Fragment>
<RN.View style={styles.shops}>
{this.props.product.shops.map(this.renderShop)}
</RN.View>
<Text size="smaller" color="lighter" style={styles.subtitle}>
Informatie is beschikbaar van{' '}
{this.props.shops.map(shop => shop.name).join(', ')}. Binnenkort zullen andere
supermarkten volgen.
</Text>
</React.Fragment>
);
};

Expand Down Expand Up @@ -60,6 +73,10 @@ const styles = RN.StyleSheet.create({
flexWrap: 'wrap',
justifyContent: 'center',
},
subtitle: {
marginBottom: 32,
paddingHorizontal: 16,
},
shopContainer: {
marginHorizontal: 8,
marginBottom: 16,
Expand Down

0 comments on commit 2c8ba6b

Please sign in to comment.