Fix margin at bottom for Subjects, HomeScreen.

This commit is contained in:
Ceda EI 2020-03-21 13:34:18 +05:30
parent 0feabb5599
commit edba7c9458
2 changed files with 14 additions and 5 deletions

View File

@ -36,7 +36,7 @@ function Subjects({ theme, subjects, addSubject, removeSubject }) {
style={
[
style.card,
{marginBottom: idx === subjects.length - 1 ? 12 : 0 }
{marginBottom: idx === subjects.length - 1 ? 80 : 0 }
]
}
>

View File

@ -10,13 +10,22 @@ import {
import {
View,
StyleSheet
StyleSheet,
ScrollView
} from "react-native";
function HomeScreen({ theme, timetable, subjects, navigation, days }) {
return (<>
return (<ScrollView>
{timetable.map((day, dayIdx) => (
<Card key={dayIdx} style={style.card}>
<Card
key={dayIdx}
style={
[
style.card,
{marginBottom: dayIdx === 6 ? 80 : 0 }
]
}
>
<Card.Title title={days[dayIdx]} />
<Card.Content>
{day.map((cls, idx) => {
@ -37,7 +46,7 @@ function HomeScreen({ theme, timetable, subjects, navigation, days }) {
</Card.Actions>
</Card>
))}
</>);
</ScrollView>);
}
HomeScreen.propTypes = {