Skip to content

Commit

Permalink
Made form due dates show up better or not at all in cases of blank or…
Browse files Browse the repository at this point in the history
… n/a
  • Loading branch information
malee31 committed Sep 19, 2020
1 parent c48e5aa commit f768fa6
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 deletions.
10 changes: 6 additions & 4 deletions components/Forms.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,12 +56,14 @@ export default class Forms extends React.Component {
} else {
return (
<View style={Styles.formButton}>
{entry[4].trim().toLowerCase() !== "n/a" && entry[4].trim() !== "" ? (
<Text style={Styles.formText}>
Due {entry[4]}
</Text>
) : null}
<LinkButton
style={Styles.formBtn}
style={[Styles.resourceButton, Styles.formBtn]}
title={entry[1]} url={entry[2]}/>
<Text style={Styles.formText}>
Due {entry[4]}
</Text>
</View>
);
}
Expand Down
7 changes: 3 additions & 4 deletions components/parts/Styles.js
Original file line number Diff line number Diff line change
Expand Up @@ -94,14 +94,13 @@ const styles = StyleSheet.create({
width: "100%",
minHeight: 45,
flex: 1,
justifyContent: 'space-between',
justifyContent: 'space-around',
alignItems: "flex-start",
flexDirection: 'row',
paddingHorizontal: "4%",
marginVertical: 10
marginVertical: 4
},
formBtn: {
width: "70%"
marginVertical: 2
},
formText: {
flex: 1,
Expand Down

0 comments on commit f768fa6

Please sign in to comment.