-
Notifications
You must be signed in to change notification settings - Fork 14
Finish Festival Lineup assignment #5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Tamir198
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Left you some comments
| } | ||
|
|
||
| let ticketsStatusText:string; | ||
| if(ticketsLeft===0) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Extract this into constant variable
|
|
||
| let ticketsStatusText:string; | ||
| if(ticketsLeft===0) | ||
| ticketsStatusText="SOLD OUT"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same for the hardcoded text (better sit inside constant file)
When we have magic numbers like this in the code (magic number is any number hardcoded inside the code) its very confusing
| // 1–30 → "Last tickets – hurry up!" | ||
| // >30 → "Tickets available" | ||
| let interestedText:string; | ||
| if(isInterested) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can do interestedText = condition ? "first text" : "second text"
| {/* TODO - shows.map((show)=>{ return <ShowCard id={show.id} .../> })*/} | ||
| {shows.map((show) => { | ||
| return ( | ||
| <ShowCard |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will this work? :
{shows.map((show) => (
<ShowCard key={show.id} {...show} />
))}
No description provided.