Skip to content

Commit cd29e20

Browse files
mjsisleysteida
authored andcommitted
Make Footer sticky with Flex (este#1247)
1 parent e61daea commit cd29e20

File tree

1 file changed

+25
-12
lines changed

1 file changed

+25
-12
lines changed

src/browser/app/App.js

Lines changed: 25 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import R from 'ramda';
99
import React from 'react';
1010
import favicon from '../../common/app/favicon';
1111
import start from '../../common/app/start';
12-
import { Container } from '../app/components';
12+
import { Box, Container, Flex } from '../app/components';
1313
import { Match, ThemeProvider } from '../../common/app/components';
1414
import { Miss } from 'react-router';
1515
import { connect } from 'react-redux';
@@ -25,6 +25,15 @@ import OfflinePage from '../offline/OfflinePage';
2525
import SignInPage from '../auth/SignInPage';
2626
import TodosPage from '../todos/TodosPage';
2727

28+
const styles = {
29+
container: {
30+
minHeight: '100vh',
31+
},
32+
page: {
33+
flex: 1,
34+
},
35+
};
36+
2837
// v4-alpha.getbootstrap.com/getting-started/introduction/#starter-template
2938
const bootstrap4Metas: any = [
3039
{ charset: 'utf-8' },
@@ -59,17 +68,21 @@ const App = ({ currentLocale, currentTheme }) => (
5968
...favicon.link,
6069
]}
6170
/>
62-
<Header />
63-
<Match exactly pattern="/" component={HomePage} />
64-
<Match pattern="/fields" component={FieldsPage} />
65-
<Match pattern="/users" component={UsersPage} />
66-
<Match pattern="/intl" component={IntlPage} />
67-
<Match pattern="/offline" component={OfflinePage} />
68-
<Match pattern="/signin" component={SignInPage} />
69-
<Match pattern="/todos" component={TodosPage} />
70-
<Match authorized pattern="/me" component={MePage} />
71-
<Miss component={NotFoundPage} />
72-
<Footer />
71+
<Flex flexColumn style={styles.container}>
72+
<Header />
73+
<Box style={styles.page}>
74+
<Match exactly pattern="/" component={HomePage} />
75+
<Match pattern="/fields" component={FieldsPage} />
76+
<Match pattern="/users" component={UsersPage} />
77+
<Match pattern="/intl" component={IntlPage} />
78+
<Match pattern="/offline" component={OfflinePage} />
79+
<Match pattern="/signin" component={SignInPage} />
80+
<Match pattern="/todos" component={TodosPage} />
81+
<Match authorized pattern="/me" component={MePage} />
82+
<Miss component={NotFoundPage} />
83+
</Box>
84+
<Footer />
85+
</Flex>
7386
</Container>
7487
</ThemeProvider>
7588
);

0 commit comments

Comments
 (0)