Browse Source

adding address to map modal

master
analuizaff 4 years ago
parent
commit
e4e2b72627
  1. 3
      src/app/components/MapModal.js
  2. 4
      src/app/hooks/selectFromDB.js

3
src/app/components/MapModal.js

@ -155,6 +155,7 @@ function componentBody(props) {
// 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 address = props.address ? props.address : "Erro ao carregar endereço"
return (
<View style={styles.bodyRow}>
@ -167,7 +168,7 @@ function componentBody(props) {
<View style={styles.bodyInfo}>
<Text style={styles.bodyTitle}>{props.title}</Text>
{iconTextRow({ name: "map-marker", description: "Rua Nassau, 158" })}
{iconTextRow({ name: "map-marker", description: address })}
{iconTextRow({ name: "calendar", description: date })}
{iconTextRow({ name: "account", description: "Usuário ativo" })}
{pictures.length > 0 && iconImageRow({ name: "camera", pic: pictures })}

4
src/app/hooks/selectFromDB.js

@ -63,6 +63,7 @@ function partsePluviometer(row) {
description:
row["Precipitation"] + "mm" + ", " + row["Date"] + description,
pictures: row["Images"],
address: row["Address"],
};
console.log(i);
return i;
@ -88,6 +89,7 @@ function parseFloodZones(row) {
description: row["Description"],
date: row["Date"] + " | " + row["Time"],
pictures: row["Images"],
address: row["Address"],
};
}
@ -110,6 +112,7 @@ function parseRiverLevel(row) {
description: row["Description"],
date: row["Date"] + " | " + row["Time"],
pictures: row["Images"],
address: row["Address"],
};
}
@ -141,6 +144,7 @@ function parseRainLevel(row) {
description: description,
date: row["Date"] + " | " + row["Time"],
pictures: row["Images"],
address: row["Address"],
};
}

Loading…
Cancel
Save