Skip to content

Commit 4974a80

Browse files
fix(web): schema fields access forshowVoiceSearch example for SearchBox
1 parent de9f960 commit 4974a80

File tree

2 files changed

+13
-24
lines changed

2 files changed

+13
-24
lines changed

packages/web/examples/SearchBoxWithVoiceSearch/src/index.css

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,11 @@ body {
7070
.authors-list {
7171
color: #9d9d9d;
7272
font-weight: bold;
73+
overflow: hidden;
74+
text-overflow: ellipsis;
75+
display: -webkit-box;
76+
-webkit-line-clamp: 2;
77+
-webkit-box-orient: vertical;
7378
}
7479

7580
.ratings-list {

packages/web/examples/SearchBoxWithVoiceSearch/src/index.js

Lines changed: 8 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -28,13 +28,13 @@ const Main = () => (
2828
className="result-list-container"
2929
pagination
3030
react={{
31-
and: 'BookSensor',
31+
and: 'MoviesSensor',
3232
}}
3333
render={({ data }) => (
3434
<ReactiveList.ResultCardsWrapper>
3535
{data.map((item) => (
3636
<ResultCard id={item._id} key={item._id}>
37-
<ResultCard.Image src={item.image} />
37+
<ResultCard.Image src={item.poster_path} />
3838
<ResultCard.Title>
3939
<div
4040
className="book-title"
@@ -47,35 +47,19 @@ const Main = () => (
4747
<ResultCard.Description>
4848
<div className="flex column justify-space-between">
4949
<div>
50-
<div>
51-
by{' '}
50+
<div title={item.overview}>
5251
<span className="authors-list">
53-
{item.authors}
52+
{item.overview}
5453
</span>
5554
</div>
5655
<div className="ratings-list flex align-center">
57-
<span className="stars">
58-
{
59-
/* eslint-disable */
60-
Array(item.average_rating_rounded)
61-
.fill('x')
62-
.map((_, index) => (
63-
<i
64-
className="fas fa-star"
65-
key={index}
66-
/>
67-
))
68-
/* eslint-enable */
69-
}
70-
</span>
71-
<span className="avg-rating">
72-
({item.average_rating} avg)
56+
<span>
57+
{item.genres.map((_) => (
58+
<span>{_}</span>
59+
))}
7360
</span>
7461
</div>
7562
</div>
76-
<span className="pub-year">
77-
Pub {item.original_publication_year}
78-
</span>
7963
</div>
8064
</ResultCard.Description>
8165
</ResultCard>

0 commit comments

Comments
 (0)