You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Very cool project, love the idea and also very impressed at how far you got with it.
Grest state management! Would be nice to see the variant tracked in state as well, this would help you eventually calculate the real total. Though you may have to switch to an object rather than array for that. Something like this:
Project was super easy to figure out. Great component naming, variable naming, folder structure etc. I like that you've kept all you lib/db stuff out of the app folder 👍
The styling is really nice too, generally great use of contrast.
We've squashed our politicians! Try this:
<ImageclassName="object-cover"src={servant.profile_img}// could we put a more meaningful alt here?alt={`A profile picture of ${servant.name}`}fill={true}priority/>
...also consider making RenderServants and RenderFiltered the same component, or have a new component called something like PoliticianCard. This means you don't have to make changes to both files when you fix something like this.
We could do more object destructuring throughout the codebase, just to make it a bit easier to read, not a big deal though:
exportdefaultfunctionRenderIndividualServant({ params }){constid=params.idconst{name, profile_img, base_price, about}=selectServantByID(id)constvariants=listVariants()return(<h3>{name}</h3><Imagesrc={profile_img}alt="Servant Profile Picture"width={200}
height={200}priority/><p>Price: £{base_price}</p><p>{about}</p>
<p>What would you like {name} to do for you? </p><VariantSelectvariants={variants}base_price={base_price}/><AddToCartservant_name={name}/></>
)}
Great work with this, I'm super impressed!
The text was updated successfully, but these errors were encountered:
Very cool project, love the idea and also very impressed at how far you got with it.
Project was super easy to figure out. Great component naming, variable naming, folder structure etc. I like that you've kept all you lib/db stuff out of the app folder 👍
The styling is really nice too, generally great use of contrast.
We've squashed our politicians! Try this:
...also consider making RenderServants and RenderFiltered the same component, or have a new component called something like PoliticianCard. This means you don't have to make changes to both files when you fix something like this.
The text was updated successfully, but these errors were encountered: