Skip to content

Commit

Permalink
make results one row
Browse files Browse the repository at this point in the history
  • Loading branch information
brrkrmn committed Jan 22, 2024
1 parent 563dc1c commit 1501837
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 20 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,12 @@ export const styles = theme => ({
projectsContainerStyle: {
margin: 0,
},
loggedOutResultsContainer: {
display: 'flex',
justifyContent: 'center',
maxHeight: '400px',
overflow: 'hidden',
},
cardStyle: {
display: 'flex',
flexDirection: 'column',
Expand Down Expand Up @@ -121,7 +127,7 @@ export const styles = theme => ({
transitionStyle: {
height: '20em',
marginTop: '-20em',
background: 'linear-gradient(0deg, rgba(255,255,255,1) 38%, rgba(212,46,46,0) 75%)',
background: 'linear-gradient(0deg, rgba(255,255,255,1) 34%, rgba(255,255,255,0) 100%)',
position: 'relative'
},
loginCardStyle: {
Expand Down Expand Up @@ -207,6 +213,7 @@ export const staffPickStyleOverrides = (theme) => ({
margin: 0
},
MessagePrimaryStyle: {
margin: 0,
fontSize: '1.8rem',
fontWeight: 700,
[theme.breakpoints.down('600')]: {
Expand Down
40 changes: 21 additions & 19 deletions zubhub_frontend/zubhub/src/views/search_results/SearchResults.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ function SearchResults(props) {
"{getQueryParams(window.location.href).get('q')}"
</Typography>
</Grid>
<div className={clsx(classes.creatorsContainerStyle, !props.auth?.token && classes.creatorsContainerLoggedOutStyle)}>
<div className={clsx(classes.creatorsContainerStyle, !props.auth?.token && classes.creatorsContainerLoggedOutStyle && classes.loggedOutResultsContainer)}>
{getResults(
getQueryParams(window.location.href).get('type'),
results,
Expand Down Expand Up @@ -237,24 +237,26 @@ function SearchResults(props) {
>
{t('searchResults.errors.noResultDescription')}
</Typography>
{staff_picks.map(staff_pick => (
<StaffPick
key={staff_pick.id}
staff_pick={staff_pick}
updateProjects={res =>
handleSetState(
updateStaffPicks(res, staff_pick.id, props, toast),
)
}
styleOverrides={{
root: staffPickClasses.root,
mainContainer: staffPickClasses.mainContainerStyle,
MessagePrimary: staffPickClasses.MessagePrimaryStyle,
}}
{...props}
/>
))
}
<div className={clsx(!props.auth?.token && classes.loggedOutResultsContainer)}>
{staff_picks.map(staff_pick => (
<StaffPick
key={staff_pick.id}
staff_pick={staff_pick}
updateProjects={res =>
handleSetState(
updateStaffPicks(res, staff_pick.id, props, toast),
)
}
styleOverrides={{
root: staffPickClasses.root,
mainContainer: staffPickClasses.mainContainerStyle,
MessagePrimary: staffPickClasses.MessagePrimaryStyle,
}}
{...props}
/>
))
}
</div>
</>
)
}
Expand Down

0 comments on commit 1501837

Please sign in to comment.