Skip to content

Almog Lavi#3

Open
Lavi2910 wants to merge 3 commits intoColmanDevClubORG:mainfrom
Lavi2910:main
Open

Almog Lavi#3
Lavi2910 wants to merge 3 commits intoColmanDevClubORG:mainfrom
Lavi2910:main

Conversation

@Lavi2910
Copy link
Copy Markdown

No description provided.

@Lavi2910 Lavi2910 closed this Dec 11, 2025
@Lavi2910 Lavi2910 changed the title created a react website that is managing interested list for shows. Almog Lavi Dec 11, 2025
@Lavi2910 Lavi2910 reopened this Dec 11, 2025
Copy link
Copy Markdown
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.

Hey left you some changes

// true → "This show is in your interested list 🎟️"
let ticketsStatusText;

if (ticketsLeft <= 0) {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Save you numbers into variables so it will not be so confusing (magic numbers) and the hard coded strings inside constant file (This comment apply to all the numbers and hardcoded texts)


let interestString;
if(isInterested)
interestString = "this show is in your interested list 🎟️"
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One more possible way of doing it is :

interestString = isInterested
  ? "this show is in your interested list 🎟️"
  : "You haven't added this show yet";

<div className="show-image-wrapper">
{/* TODO 6: Replace placeholder with real <img> from props */}
{/* <img src={image} alt={artist} className="show-image" /> */}
<img src={image} alt={artist} className="show-image" />
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great work on the alt attribute

src/App.tsx Outdated
<div className="shows-grid">
{/* TODO - shows.map((show)=>{ return <ShowCard id={show.id} .../> })*/}
{shows.map((show)=> {
return <ShowCard id={show.id} artist={show.artist} day={show.day}
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You could also :

{shows.map(show => (
  <ShowCard key={show.id} {...show} />
))}

This is because the props that ShowCard is expecting to get got the same names as the show object.

Also did you notice that I added a key prop? why is this ? try to understand

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

becase "key" is a saved word and you cant access it?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ye its a saved word but why i added it?

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.

3 participants