Improved dashboard items placement

This commit is contained in:
Arnaud Vergnet 2020-04-21 10:22:32 +02:00
parent c37e052aa2
commit dc57cbd7bd
2 changed files with 11 additions and 3 deletions

View file

@ -30,11 +30,12 @@ class ActionsDashBoardItem extends React.Component<Props> {
description={"VOTRE COMPTE"}
left={props => <Avatar.Image
{...props}
size={54}
size={40}
source={ICON_AMICALE}
style={styles.avatar}/>}
right={props => <List.Icon {...props} icon="chevron-right"/>}
onPress={() => this.props.navigation.navigate("amicale-home")}
style={styles.list}
/>
<List.Item
title={"STUDENT WEBSITES"}
@ -42,6 +43,7 @@ class ActionsDashBoardItem extends React.Component<Props> {
left={props => <List.Icon {...props} icon="web"/>}
right={props => <List.Icon {...props} icon="chevron-right"/>}
onPress={() => this.props.navigation.navigate("websites-home")}
style={styles.list}
/>
<List.Item
title={"SERVICES INSA"}
@ -49,6 +51,7 @@ class ActionsDashBoardItem extends React.Component<Props> {
left={props => <List.Icon {...props} icon="star"/>}
right={props => <List.Icon {...props} icon="chevron-right"/>}
onPress={() => this.props.navigation.navigate("insa-home")}
style={styles.list}
/>
</Card>
);
@ -61,12 +64,16 @@ const styles = StyleSheet.create({
marginLeft: 10,
marginRight: 10,
marginTop: 10,
elevation: 4,
borderWidth: 1,
},
avatar: {
backgroundColor: 'transparent'
},
list: {
// height: 50,
paddingTop:0,
paddingBottom:0,
}
});
export default withTheme(ActionsDashBoardItem);

View file

@ -202,6 +202,7 @@ class HomeScreen extends React.Component<Props> {
*/
generateDashboardDataset(dashboardData: fullDashboard): Array<dashboardItem> {
return [
{id: 'actions', content: []},
{
id: 'top',
content: [
@ -247,7 +248,6 @@ class HomeScreen extends React.Component<Props> {
},
]
},
{id: 'actions', content: []},
{
id: 'event',
content: dashboardData.today_events
@ -445,6 +445,7 @@ class HomeScreen extends React.Component<Props> {
contentContainerStyle={{
marginLeft: 'auto',
marginRight: 'auto',
marginTop: 5,
}}
/>);
}