ShortReview
An audience review on an entry, with a spoiler shield, replies, withdrawal and reports.
import { ShortReview } from '@iffday/web/src/review-card';Example
An audience review on an entry page. It adds four things to ReviewCard: a review marked as a spoiler stays covered and its text is requested from the API only when opened; Reply opens the replies and a reply box; the menu lets the author withdraw the review and anyone report it; long reviews show eight lines and then More.
12 likes
Mina
Same screening! I was in row three.
3 likes
import { ShortReview } from '@iffday/web/src/review-card';
import { reviews } from '../../../samples';
export default function Example() {
return (
<div style={{ width: '100%' }}>
{reviews.map((review, index) => (
<ShortReview key={review.id} review={review} stars={[8, 6][index]} reload={() => {}} />
))}
</div>
);
}Usage
reload is called after a reply or withdrawal succeeds, so the page reads its reviews again. stars is the author’s rating of the film, looked up by the page and passed in.
Props
ShortReview
apps/web/src/review-card.tsx:149A short audience review on a film entry, with spoiler reveal, replies, withdrawal by its author and reporting.
| Prop | Type | Default |
|---|---|---|
review* | Review | |
reload* | () => void | |
stars | number | null |