Skip to content

Conversation

@edenkaushansky-afk
Copy link

No description provided.

Copy link
Member

@Tamir198 Tamir198 left a 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)
Copy link
Member

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";
Copy link
Member

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)
Copy link
Member

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
Copy link
Member

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} />
))}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants