From 78b15cad18b9ff467527dc80a7ad6faf8229f1c8 Mon Sep 17 00:00:00 2001 From: sct Date: Sat, 2 Jan 2021 14:06:41 +0000 Subject: [PATCH] refactor(frontend): titlecard design experiment --- src/components/TitleCard/index.tsx | 76 ++++++++++++++++++++---------- 1 file changed, 52 insertions(+), 24 deletions(-) diff --git a/src/components/TitleCard/index.tsx b/src/components/TitleCard/index.tsx index 1130af534..c2652b2f9 100644 --- a/src/components/TitleCard/index.tsx +++ b/src/components/TitleCard/index.tsx @@ -1,8 +1,5 @@ import React, { useState, useCallback, useEffect } from 'react'; import type { MediaType } from '../../../server/models/Search'; -import Available from '../../assets/available.svg'; -import Requested from '../../assets/requested.svg'; -import Unavailable from '../../assets/unavailable.svg'; import { withProperties } from '../../utils/typeHelpers'; import Transition from '../Transition'; import Placeholder from './Placeholder'; @@ -98,33 +95,53 @@ const TitleCard: React.FC = ({ tabIndex={0} >
-
-
- {mediaType === 'movie' - ? intl.formatMessage(messages.movie) - : intl.formatMessage(messages.tvshow)} -
-
- -
+
{(currentStatus === MediaStatus.AVAILABLE || currentStatus === MediaStatus.PARTIALLY_AVAILABLE) && ( - +
+ + + +
)} {currentStatus === MediaStatus.PENDING && ( - +
+ + + +
)} {currentStatus === MediaStatus.PROCESSING && ( - +
+ + + +
)}
= ({ leaveTo="opacity-0" >
+
+
+ {mediaType === 'movie' + ? intl.formatMessage(messages.movie) + : intl.formatMessage(messages.tvshow)} +
+