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

task commit #1

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open

task commit #1

wants to merge 5 commits into from

Conversation

tokiyskiygruz
Copy link
Owner

No description provided.

src/assets/icons/Close_round_fill.svg Outdated Show resolved Hide resolved
src/components/App/App.jsx Outdated Show resolved Hide resolved
src/components/App/App.jsx Outdated Show resolved Hide resolved
src/components/App/App.jsx Outdated Show resolved Hide resolved
src/components/App/App.jsx Outdated Show resolved Hide resolved
src/components/Chip/Chip.jsx Outdated Show resolved Hide resolved
src/components/Chip/Chip.jsx Outdated Show resolved Hide resolved
src/components/QuizPlayground/QuizPlayground.jsx Outdated Show resolved Hide resolved
src/components/QuizPlayground/QuizPlayground.jsx Outdated Show resolved Hide resolved
src/index.css Outdated Show resolved Hide resolved
@kaguya3222
Copy link
Collaborator

You have 2 lock files from 2 different package managers:

  • package-lock.json -> npm
  • yarn.lock -> yarn

@kaguya3222
Copy link
Collaborator

Let's make this app to support breakpoints from 360px
CleanShot 2024-10-29 at 22 06 05@2x

@kaguya3222
Copy link
Collaborator

why do you need mock-data folder?

src/components/App/App.jsx Outdated Show resolved Hide resolved
src/components/App/App.jsx Outdated Show resolved Hide resolved
src/components/QuizPlayground/QuizPlayground.jsx Outdated Show resolved Hide resolved
src/components/App/App.jsx Outdated Show resolved Hide resolved
src/components/QuizButton/QuizButton.jsx Outdated Show resolved Hide resolved
src/components/QuizPlayground/QuizPlayground.jsx Outdated Show resolved Hide resolved
src/components/QuizPlayground/QuizPlayground.jsx Outdated Show resolved Hide resolved
src/components/QuizPlayground/QuizPlayground.jsx Outdated Show resolved Hide resolved
}, [countriesData]);

const updateQuestion = (option) => {
if (answers[activeStageIndex] === undefined) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Instead of nesting code inside in if it's better to use conditional guard

if (answers[activeStageIndex]) return 

setAnswers((prevAnswers) => ({
        ...prevAnswers,
        [activeStageIndex]: option,
      }));

https://refactoring.guru/uk/replace-nested-conditional-with-guard-clauses

return [];
}, [countriesData]);

const updateQuestion = (option) => {
Copy link
Collaborator

Choose a reason for hiding this comment

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

option -> answer

I see a lot of abstract namings, please pay attention

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