Browse Source

Fixing address legth in MapModal

master
GabrielTrettel 3 years ago
parent
commit
8e907fc72b
  1. 20
      src/app/components/MapModal.js

20
src/app/components/MapModal.js

@ -89,6 +89,7 @@ function topBar(props, setShowModal, setCurrentMarker) {
} }
function iconTextRow(props) { function iconTextRow(props) {
const description = props?.description?.replace(/\n/g, ", ")
return ( return (
<View flexDirection="row" alignSelf="flex-start" marginVertical={3}> <View flexDirection="row" alignSelf="flex-start" marginVertical={3}>
<View alignSelf="flex-start" marginRight={10}> <View alignSelf="flex-start" marginRight={10}>
@ -98,9 +99,7 @@ function iconTextRow(props) {
color={colors.primary} color={colors.primary}
/> />
</View> </View>
<View style={{ flexDirection: "row", flexGrow: 1}}>
<Text style={{...styles.text, flexShrink: 1}}>{props.description}</Text>
</View>
<Text style={[styles.text, {width: "80%"}]}>{description}</Text>
</View> </View>
); );
} }
@ -214,24 +213,16 @@ function moreInfo(props) {
}} }}
> >
{!hasData ? ( {!hasData ? (
<View>
<Text
style={{
...styles.text_pluv,
alignSelf: "center",
}}
>
Não dados para este pluviômetro
</Text>
<Text <Text
style={{ style={{
...styles.text_pluv, ...styles.text_pluv,
alignSelf: "center", alignSelf: "center",
textAlign: "center",
}} }}
> >
Não dados para este pluviômetro{"\n"}
nos últimos 5 dias nos últimos 5 dias
</Text> </Text>
</View>
) : ( ) : (
<PluviometerGraphics chartHeight={chartHeight} data={props.data} /> <PluviometerGraphics chartHeight={chartHeight} data={props.data} />
)} )}
@ -243,7 +234,7 @@ function componentBody(props) {
const dims = scaleDimsFromWidth(95, 95, 16); const dims = scaleDimsFromWidth(95, 95, 16);
// NOTE: This code is refered to our local SQLite solution. Revise this when implement rest API. // NOTE: This code is refered to our local SQLite solution. Revise this when implement rest API.
const pictures = JSON.parse(props.pictures); const pictures = JSON.parse(props.pictures);
const date = props.date ? props.date : "implementando...";
const date = props.date ? props.date : "Não foi possível obter a data";
const address = props.address const address = props.address
? props.address ? props.address
: "Não foi possível carregar o endereço "; : "Não foi possível carregar o endereço ";
@ -413,6 +404,7 @@ const styles = StyleSheet.create({
fontSize: dimensions.text.secondary, fontSize: dimensions.text.secondary,
}, },
bodyInfo: { bodyInfo: {
marginRight: 16,
flexDirection: "column", flexDirection: "column",
alignContent: "flex-start", alignContent: "flex-start",
}, },

Loading…
Cancel
Save