import React, { Component } from "react";
import {
TextInput,
View,
ScrollView,
StyleSheet,
TouchableOpacity,
Image
} from "react-native";
import { scale, verticalScale, moderateScale } from "react-native-size-matters";
import Size from "../../config/size";
import Text from "react-native-text";
import FastImage from "react-native-fast-image";
import { width, height } from "../../config/screen";
import Icon from "react-native-vector-icons/dist/Ionicons";
import theme from "../../config/colors";
import { Fonts } from "../../config/fonts";
import { observable, transaction } from "mobx";
import { observer, inject } from "mobx-react/native";
const size = new Size();
@inject(["menuStore"], ["userStore"])
@observer
export default class MenuDetailsView extends Component {
constructor(props) {
super(props);
this.store = this.props.menuStore;
this.userStore = this.props.userStore;
}
separate(index) {
// console.log(index + " "+ this.store.menuDetails.tags.size)
if (index < 2) {
return (
);
}
}
tags() {}
render() {
console.log(this.userStore.languageSelection);
console.log(this.store.menuDetails.tags);
const tagsLoop = this.store.menuDetails.tags.map((tags, index) => (
{this.userStore.dataLanguage(tags, "name")}
{this.separate(index)}
));
return (
this.props.self.foodInformationPageDismiss()}
>
HKD ${this.store.menuDetails.price}
{this.userStore.dataLanguage(this.store.menuDetails, "name")}
{this.userStore.dataLanguage(
this.store.menuDetails.restaurant,
"name"
)}
{this.userStore.dataLanguage(
this.store.menuDetails.restaurant,
"addr"
)}
{tagsLoop}
{this.userStore.dataLanguage(this.store.menuDetails, "intro")}
);
}
}
const styles = StyleSheet.create({
marginSide: {
marginRight: 10,
marginLeft: 10
},
introView: {
marginRight: 10,
marginLeft: 10,
marginTop: 15,
fontSize: 20
},
TextStyle: {
fontFamily: Fonts.century,
color: theme.coolGrey
}
});