diff --git a/src/components/Dropdown/Dropdown.module.scss b/src/components/Dropdown/Dropdown.module.scss index 995fcb105..7733d07a3 100644 --- a/src/components/Dropdown/Dropdown.module.scss +++ b/src/components/Dropdown/Dropdown.module.scss @@ -7,13 +7,13 @@ $select-arrow: variables.$white; $select-focus: theme.$primary-color; .dropdown { + height: 36px; position: relative; display: grid; align-items: center; width: 140px; margin-left: 24px; font-size: 1.25rem; - line-height: 1.1; background-color: rgba(0, 0, 0, 0.54); border: 1px solid rgba(255, 255, 255, 0.3); border-radius: 0.25em; @@ -35,6 +35,7 @@ $select-focus: theme.$primary-color; .select { z-index: 1; width: 100%; + height: 36px; margin: 0; padding: 9px 24px 9px 9px; text-overflow: ellipsis; @@ -42,7 +43,6 @@ $select-focus: theme.$primary-color; font-family: inherit; font-weight: 700; font-size: 1rem; - line-height: inherit; background: none; border: none; outline: none; diff --git a/src/components/Filter/Filter.module.scss b/src/components/Filter/Filter.module.scss index 5e023c62d..896f3335a 100644 --- a/src/components/Filter/Filter.module.scss +++ b/src/components/Filter/Filter.module.scss @@ -11,9 +11,3 @@ margin: 0 4px; } } - -.optionMobile { - @include responsive.mobile-only() { - display: none; - } -} diff --git a/src/components/Filter/Filter.tsx b/src/components/Filter/Filter.tsx index a3388db8c..40a6b3f76 100644 --- a/src/components/Filter/Filter.tsx +++ b/src/components/Filter/Filter.tsx @@ -56,7 +56,6 @@ const Filter: FC = ({ name, value, defaultLabel, options, setValue, value value={value} onChange={handleChange} aria-label={t('filter_videos_by_genre')} - optionsStyle={styles.optionMobile} /> )} diff --git a/src/screens/Playlist/Playlist.module.scss b/src/screens/Playlist/Playlist.module.scss index 92dedcf75..c288f028f 100644 --- a/src/screens/Playlist/Playlist.module.scss +++ b/src/screens/Playlist/Playlist.module.scss @@ -32,6 +32,7 @@ display: flex; align-items: center; + height: 36px; margin: 24px 0; > h2 { diff --git a/src/screens/Playlist/Playlist.tsx b/src/screens/Playlist/Playlist.tsx index e48727da1..2d54070e8 100644 --- a/src/screens/Playlist/Playlist.tsx +++ b/src/screens/Playlist/Playlist.tsx @@ -1,4 +1,4 @@ -import React, { useContext, useMemo, useState } from 'react'; +import React, { useContext, useEffect, useMemo, useState } from 'react'; import { RouteComponentProps, useHistory } from 'react-router-dom'; import type { PlaylistItem } from 'types/playlist'; import type { Config } from 'types/Config'; @@ -26,7 +26,7 @@ function Playlist({ }: RouteComponentProps) { const history = useHistory(); const config: Config = useContext(ConfigContext); - const { isLoading, error, data: { title, playlist } = { title: '', playlist: [] } } = usePlaylist(id); + const { isLoading, isPlaceholderData, error, data: { title, playlist } = { title: '', playlist: [] } } = usePlaylist(id); const [filter, setFilter] = useState(''); @@ -34,6 +34,11 @@ function Playlist({ const filteredPlaylist = useMemo(() => filterPlaylist(playlist, filter), [playlist, filter]); const updateBlurImage = useBlurImageUpdater(filteredPlaylist); + useEffect(() => { + // reset filter when the playlist id changes + setFilter(''); + }, [id]); + const onCardClick = (playlistItem: PlaylistItem) => history.push(cardUrl(playlistItem, id)); const onCardHover = (playlistItem: PlaylistItem) => updateBlurImage(playlistItem.image); @@ -51,8 +56,8 @@ function Playlist({
-

{title}

- +

{isLoading || isPlaceholderData ? 'Loading' : title}

+ {!isLoading && !isPlaceholderData && }