Browse Source

fix missing poster issu

pull/673/head
Ashishprasa 2 years ago
parent
commit
bc3d6742fb
  1. 8
      example.env
  2. 12
      src/pages/parts/search/SearchListPart.tsx

8
example.env

@ -1,8 +0,0 @@ @@ -1,8 +0,0 @@
VITE_TMDB_READ_API_KEY=...
VITE_OPENSEARCH_ENABLED=false
# make sure the cors proxy url does NOT have a slash at the end
VITE_CORS_PROXY_URL=...
# make sure the domain does NOT have a slash at the end
VITE_APP_DOMAIN=http://localhost:5173

12
src/pages/parts/search/SearchListPart.tsx

@ -67,6 +67,8 @@ export function SearchListPart({ searchQuery }: { searchQuery: string }) { @@ -67,6 +67,8 @@ export function SearchListPart({ searchQuery }: { searchQuery: string }) {
if (state.error) return <SearchSuffix failed />;
if (!results) return null;
// console.log(results);
return (
<div>
{results.length > 0 ? (
@ -76,9 +78,13 @@ export function SearchListPart({ searchQuery }: { searchQuery: string }) { @@ -76,9 +78,13 @@ export function SearchListPart({ searchQuery }: { searchQuery: string }) {
icon={Icons.SEARCH}
/>
<MediaGrid>
{results.map((v) => (
<WatchedMediaCard key={v.id.toString()} media={v} />
))}
{results.map((v) =>
v.poster === undefined ? (
""
) : (
<WatchedMediaCard key={v.id.toString()} media={v} />
),
)}
</MediaGrid>
</div>
) : null}

Loading…
Cancel
Save