Skip to content

Commit

Permalink
fix(layout): update layout height to match screen height
Browse files Browse the repository at this point in the history
  • Loading branch information
chornos13 committed Jan 20, 2021
1 parent 55dcd6d commit e2f936c
Showing 1 changed file with 14 additions and 3 deletions.
17 changes: 14 additions & 3 deletions src/layouts/containers/Public/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,30 @@ import { ReactComponentLike } from 'prop-types'
import Header from 'layouts/containers/Public/Header'
import Footer from 'layouts/containers/Public/Footer'
import Content from 'components/Content/Content'
import { Card } from 'antd'

interface IProps {
Component: ReactComponentLike
}

const HEIGHT_HEADER = 56
const HEIGHT_FOOTER = 110

function PublicContainer(props: IProps) {
const { Component } = props

return (
<div style={{ marginBottom: 64 }}>
<div>
<Header />
<Content style={{ padding: 0, minHeight: '62vh' }}>
<Component {...props} />
<Content style={{ padding: 0 }}>
<Card
bodyStyle={{ padding: 0 }}
style={{
minHeight: `calc(100vh - ${HEIGHT_HEADER + HEIGHT_FOOTER}px)`,
}}
>
<Component {...props} />
</Card>
</Content>
<Footer />
</div>
Expand Down

0 comments on commit e2f936c

Please sign in to comment.