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

Project Survey Josefin R #444

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

Conversation

JosefinRobertsson
Copy link

No description provided.

Copy link

@MalinSkill MalinSkill left a comment

Choose a reason for hiding this comment

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

Wow what an amazing project! the amount of different objects you have in your array is really impressive and how you make it work with filtering and mapping. The layout is responsive, I tried also on my phone. One thing to look into is that proceed button is very small on phone. Also when I went for salty soft candy I got licorice and fruit as flavour to choose from. Such an impressive and complex survey! great work!

@@ -13,7 +13,9 @@
work correctly both with client-side routing and a non-root public URL.
Learn how to configure a non-root public URL by running `npm run build`.
-->
<title>Technigo React App</title>
<link href="https://fonts.googleapis.com/css2?family=Permanent+Marker&display=swap" rel="stylesheet">

Choose a reason for hiding this comment

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

I think the two fonts you picked looks really good together.

{progress < 1 && (
<div className="introMsg">
<h3>
You&apos;ve reached a survey made by your local convenient store.

Choose a reason for hiding this comment

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

Nice to use this way to get '


const TasteGroup = ({ tasteGroup, setTasteGroup }) => {
const uniqueTastes = [...new Set(SnacksArray.map((snack) => snack.taste))];

Choose a reason for hiding this comment

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

This is really impressive, using one array to store all the different snacks. And then make a new array of one specific value from that array. which is then mapped again for the buttons. Just typing it out to try and wrap my head around it.

code/src/App.js Outdated
</div>
)}
{progress === 1 && <TasteGroup tasteGroup={tasteGroup} setTasteGroup={setTasteGroup} />}
{progress === 2 && <TypeOfSnack tasteGroup={tasteGroup} type={type} setType={setType} />}

Choose a reason for hiding this comment

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

Great work, passing the values from earlier questions to be able to do the conditionals!

const handleTypeChoice = (event) => {
setType(event.target.value);
};
const filteredForTasteGroup = SnacksArray.filter((snack) => snack.taste.includes(tasteGroup));

Choose a reason for hiding this comment

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

So impressed by this! Filter to only include the values corresponding with previous answer and then making a new array based on that. Mind blowing!

code/src/App.js Outdated
Comment on lines 81 to 84
tasteGroup={tasteGroup}
type={type}
texture={texture}
flavor={flavor}

Choose a reason for hiding this comment

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

good idea to have the progress button be a separate component. But maybe it does not need all that is being passed to it?

animation-iteration-count: infinite;
}

@keyframes shake {

Choose a reason for hiding this comment

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

this is so cool for the buttons

Comment on lines +4 to +6
const flavorsArray = flavor.length > 2
? `${flavor.slice(0, -1).join(', ')} and ${flavor.slice(-1)}`
: flavor.join(' and ');

Choose a reason for hiding this comment

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

Wow, I feel like you have really thought of everything! this looks like a great way to decide how it should be displayed depending on how many words there are

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