Skip to content
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

My Little Pony name generator #440

Open
wants to merge 19 commits into
base: master
Choose a base branch
from

Conversation

annikalindberg
Copy link

No description provided.

Copy link

@fridanordenlow fridanordenlow left a comment

Choose a reason for hiding this comment

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

Hi Annika! A lovely choice of theme for your survey, very nicely done! You have quite many steps and most things are working but there is something with the props being passed between components and the App that's not working? I couldn't get a complete result, see comments below. I think it worked when you demoed in our team session so I wonder what it could be? It's probably just something small causing the bug.

{step === 6 && (
<ToppingSelect
label="Select your favorite topping"
ToppingSelect={toppingSelect}

Choose a reason for hiding this comment

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

I think the uppercase in the ToppingSelect here is making the props not being passed down correctly? toppingSelect={toppingSelect}

setToppingSelect={setToppingSelect} />
)}
{step === 7 && (
<Submit Submit={submit} setSubmit={setSubmit} />

Choose a reason for hiding this comment

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

I can't see that you have any props in your Submit-component so you don't need to pass down any props here, you can just mount it like this: <Submit />

const [name, setName] = useState('');
const [colorSelect, setColorSelect] = useState('');
const [magicCrystalSelect, setMagicCrystalSelect] = useState('');
const [submit, setSubmit] = useState('');

Choose a reason for hiding this comment

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

Adding to the Submit component comment further below, I don't think you need the submit and setSubmit

{step === 8 && (
// eslint-disable-next-line max-len
<Result name={name} colorSelect={colorSelect} magicCrystalSelect={magicCrystalSelect} fruitSelect={fruitSelect} toppingSelect={toppingSelect} />
)}

Choose a reason for hiding this comment

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

I don't seem to get the correct result showing after I have submitted my answers, some of theprops are passed down but not all of them. For example after Cutie mark: and Your secret pony weapon: it's blank. I'm not sure why, maybe it's the toppingSelect messing with things? I haven't found anything else that it could be

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