diff --git a/src/components/pages/profile.js b/src/components/pages/profile.js index 580f3a1..ebb9b3e 100644 --- a/src/components/pages/profile.js +++ b/src/components/pages/profile.js @@ -4,7 +4,8 @@ import { Dimensions, Image, Text, - TouchableOpacity + TouchableOpacity, + FlatList, } from "react-native"; import * as Linking from "expo-linking"; @@ -257,25 +258,22 @@ const ProfileDisplayJsx = ({navigation}) => { {state.profile.note} - + { - state.profile.fields.map((row, i) => - - - - - ) + state.profile.fields.map((field, index) => ( + + + { field.name } + + + + + + )) } -
- { row.name } - - - - -
+ {profileButton} @@ -334,23 +332,26 @@ const styles = { fontSize: 16, marginTop: 10, }, - - metaData: { - marginTop: 20 + fields: { + container: { marginTop: 20, }, + row: { + padding: 10, + flexDirection: "row", + }, + cell: { + name: { + width: screen_width / 3, + textAlgin: "center", + }, + value: { + width: (screen_width / 3) * 2, + }, + } }, - row: { - padding: 10 - }, - rowName: { - width: screen_width / 3, - textAlign: "center" - }, - rowValue: { width: (screen_width / 3) * 2 }, anchor: { color: "#888", - textDecoration: "underline" + textDecorationLine: "underline" }, - button: { borderWidth: 1, borderColor: "#888", diff --git a/src/interface/rendering.js b/src/interface/rendering.js index ff2774d..96c3569 100644 --- a/src/interface/rendering.js +++ b/src/interface/rendering.js @@ -1,5 +1,5 @@ export function withoutHTML(string) { - return string.replaceAll(/<[^>]*>/ig, ""); + return string.replace(/<[^>]*>/ig, ""); } export function pluralize(n, singular, plural) {