Skip to content

finished#8

Open
snirtal wants to merge 2 commits intoColmanDevClubORG:mainfrom
snirtal:main
Open

finished#8
snirtal wants to merge 2 commits intoColmanDevClubORG:mainfrom
snirtal:main

Conversation

@snirtal
Copy link
Copy Markdown

@snirtal snirtal commented Dec 15, 2025

No description provided.

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.

Left you come comments

) {
// TODO 2: Create state called isInterested of type boolean (default false)
// const [isInterested, setIsInterested] = ...
export default function ShowCard(Props: ShowCardProps) {
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.

Destruct your props


let ticketsStatusText: string;

if (Props.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.

Extract all of your hardcoded numbers into constant variables


if (Props.ticketsLeft === 0) {
ticketsStatusText = "SOLD OUT";
} else if (Props.ticketsLeft <= 30) {
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.

Same for your strings, they should come from constant file

<p className="show-meta">
{/* TODO 8: Display stage, day, hour from props */}
"Stage · Day · Hour"
{Props.stage}
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.

this could be saved by destructing the props

Comment thread src/App.tsx

<main>
<div className="shows-grid">
{shows.map((show) =>{ return (<ShowCard id={show.id} artist={show.artist} stage={show.stage} day={show.day} hour={show.hour} ticketsLeft={show.ticketsLeft} image={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.

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

is better

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