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

Loading…
Cancel
Save