From 79a080ec6c72a1131b6bfe7a436f818962c95f7e Mon Sep 17 00:00:00 2001 From: Roland Date: Mon, 3 Jan 2022 16:32:41 -0700 Subject: [PATCH] Showing favorite label on favorite videos. --- app/src/components/Common.js | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/app/src/components/Common.js b/app/src/components/Common.js index 0ba16e61..64335cb8 100644 --- a/app/src/components/Common.js +++ b/app/src/components/Common.js @@ -100,10 +100,19 @@ export function VideoCard({video}) { } let poster_url = video.poster_path ? `/media/${encodeURIComponent(video.poster_path)}` : null; + let imageLabel = null; + if (video.favorite) { + imageLabel = {as: 'a', corner: 'left', icon: 'heart', color: 'green'}; + } + return ( - + @@ -501,7 +510,7 @@ export function ClearButton({onClick, style, label, icon = 'close'}) { } -export function SearchInput({initValue, onSubmit, size, placeholder='Search...'}) { +export function SearchInput({initValue, onSubmit, size, placeholder = 'Search...'}) { let [value, setValue] = useState(initValue || ''); size = size || 'small';