Skip to content

Commit 5846f18

Browse files
committed
UI - fix sticky contact info
1 parent c863c77 commit 5846f18

File tree

2 files changed

+11
-8
lines changed

2 files changed

+11
-8
lines changed

src/client/src/App.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import Header, {AdminHeader} from "./components/Header";
77
import HomePage from './pages/Home';
88
import Admin from './pages/Admin';
99
import Search360 from './pages/DataView360/Search/Search';
10-
import View360 from './pages/DataView360/View/View';
10+
import View360 from './pages/DataView360/View/View360';
1111
import About from './pages/About';
1212
import Login from './components/Login/Login';
1313
import RefreshDlg from './components/RefreshDlg';

src/client/src/pages/DataView360/View/View.js renamed to src/client/src/pages/DataView360/View/View360.js

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,11 @@ const customStyles = theme => ({
2626
color: '#fff',
2727
},
2828
stickyContainer: {
29-
position: 'fixed',
30-
paddingTop: 25,
31-
left: '-25em'
29+
position: 'sticky',
30+
top: 100
31+
},
32+
tablesCol: {
33+
minWidth: '600px'
3234
}
3335
});
3436

@@ -61,7 +63,7 @@ class View360 extends Component {
6163
'Content-Type': 'application/json',
6264
'Authorization': 'Bearer ' + this.props.access_token
6365
}
64-
} );
66+
});
6567
response = await response.json();
6668

6769
this.setState({
@@ -109,23 +111,24 @@ class View360 extends Component {
109111
</Grid>
110112
</Grid>
111113
<Grid container direction={"row"} spacing={3}>
112-
<Grid item sm={4}>
114+
<Grid item xs={4}>
113115
<Grid className={classes.stickyContainer} container direction={"column"}
114116
alignItems={"center"}>
115117
<Grid item>
116118
<ContactInfo
117119
participant={_.get(this.state, 'participantData.contact_details')}/>
118120
</Grid>
119121
<Grid item style={{"padding": "1em"}}>
120-
<Button elevation={2} variant="contained" color="primary"
122+
<Button style={{"minWidth": "180"}} elevation={2} variant="contained"
123+
color="primary"
121124
onClick={() => {
122125
this.onBackClick()
123126
}}>Back to Results
124127
</Button>
125128
</Grid>
126129
</Grid>
127130
</Grid>
128-
<Grid item sm>
131+
<Grid item xs={8} className={classes.tablesCol}>
129132
<Grid container direction="column" style={{"marginTop": "1em"}}>
130133
<Donations donations={_.get(this.state, 'participantData.donations')}/>
131134
<Adoptions adoptions={_.get(this.state, 'participantData.adoptions')}

0 commit comments

Comments
 (0)