Skip to content

Commit

Permalink
Only add padding to layout if the player is visible
Browse files Browse the repository at this point in the history
  • Loading branch information
deluan committed Apr 2, 2020
1 parent 3d6ce8a commit 86f73ee
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions ui/src/layout/Layout.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,13 @@ import AppBar from './AppBar'
import themes from '../themes'

const useStyles = makeStyles({
root: { paddingBottom: '80px' }
root: { paddingBottom: (props) => (props.addPadding ? '80px' : 0) }
})

export default (props) => {
const classes = useStyles()
const theme = useSelector((state) => themes[state.theme] || themes.DarkTheme)
const queue = useSelector((state) => state.queue)
const classes = useStyles({ addPadding: queue.queue.length > 0 })

return (
<Layout
Expand Down

0 comments on commit 86f73ee

Please sign in to comment.