fix: pr suggestions

feature/watchlist-sync
Ryan Cohen 2 years ago
parent e72f05b311
commit 1b98fd0aac

@ -104,11 +104,7 @@ const Discover = () => {
placeholder={<RequestCard.Placeholder />}
emptyMessage={intl.formatMessage(messages.noRequests)}
/>
{!(
!!watchlistItems &&
!watchlistError &&
watchlistItems.results.length === 0
) && (
{(!watchlistItems || !!watchlistItems.results.length) && !watchlistError && (
<>
<div className="slider-header">
<Link href="/discover/watchlist">
@ -121,11 +117,6 @@ const Discover = () => {
<Slider
sliderKey="watchlist"
isLoading={!watchlistItems && !watchlistError}
isEmpty={
!!watchlistItems &&
!watchlistError &&
watchlistItems.results.length === 0
}
items={watchlistItems?.results.map((item) => (
<TmdbTitleCard
id={item.tmdbId}

@ -10,7 +10,7 @@ interface SliderProps {
sliderKey: string;
items?: JSX.Element[];
isLoading: boolean;
isEmpty: boolean;
isEmpty?: boolean;
emptyMessage?: string;
placeholder?: React.ReactNode;
}
@ -24,7 +24,7 @@ const Slider = ({
sliderKey,
items,
isLoading,
isEmpty,
isEmpty = false,
emptyMessage,
placeholder = <TitleCard.Placeholder />,
}: SliderProps) => {

Loading…
Cancel
Save