Skip to content

Commit

Permalink
Fix layout of album shares
Browse files Browse the repository at this point in the history
This also relates to #149 and #178
  • Loading branch information
viktorstrate committed Feb 1, 2021
1 parent 35e32d2 commit fa35ea1
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions ui/src/Pages/SharePage/AlbumSharePage.js
Expand Up @@ -4,6 +4,11 @@ import { Route, Switch } from 'react-router-dom'
import RouterPropTypes from 'react-router-prop-types'
import Layout from '../../Layout'
import AlbumGallery from '../../components/albumGallery/AlbumGallery'
import styled from 'styled-components'

const AlbumSharePageWrapper = styled.div`
height: 100%;
`

const AlbumSharePage = ({ album, match }) => {
const SubAlbumRoute = subProps => {
Expand All @@ -25,7 +30,7 @@ const AlbumSharePage = ({ album, match }) => {
return `${match.url}/${albumId}`
}
return (
<div data-testid="AlbumSharePage">
<AlbumSharePageWrapper data-testid="AlbumSharePage">
<Switch>
<Route path={`${match.url}/:subAlbum`} component={SubAlbumRoute} />
<Route path="/">
Expand All @@ -34,7 +39,7 @@ const AlbumSharePage = ({ album, match }) => {
</Layout>
</Route>
</Switch>
</div>
</AlbumSharePageWrapper>
)
}

Expand Down

0 comments on commit fa35ea1

Please sign in to comment.