Reviews

Reviews

new Reviews(props)

A component that lists the first few reviews for either a dish or a chef, a button to open all reviews. If reviews are for a dish, a leave review option is available.

Parameters:
Name Type Description
props ReviewsProps
Source:

Type Definitions

ReviewJSON

Properties:
Name Type Description
reviewer String

name of the person who left the review

rating int

star rating of review from 1 to 5

timestamp BigInt

timestamp of review in milliseconds

comment String

comment of review

name String

dish name

dishid int

dishid of dish being reviewed

Source:

ReviewsProps

Properties:
Name Type Description
rating float

average rating of dish/chef

numReviews int

total number of ratings left for dish/chef

dishid int

dishid if component is reviews for a dish (null if chefid is not null)

chefid int

chefid if component is reviews for a chef (null if dishid is not null)

refresh function

function passed in from parent to force refresh of parent on close

reviews Array.<ReviewJSON>

array of JSON objects containing informations for the first 5 reviews

navigation Object

Stack Navigation object

Source: