lauraleonilla / quiz-app-backend

0 stars 0 forks source link

Katselmointi #2

Closed Kaltsoon closed 4 years ago

Kaltsoon commented 4 years ago

Katselmointi

Terve @lauraleonilla! Tässä lyhyt katselmointi Full Stack kurssin projektistasi.

Käytettävyys

Mitä tein?

Kokemus

Koodi

const answerOptions = [
  ...currentQuestion.incorrect_answers.map(e => e.answer),
  currentQuestion.correct_answer
];
<Route path="/quiz/:type/:quizId" exact>
  <QuizPageWithType>
</Route>

<Route path="/quiz/:quizId" exact>
  <QuizPageWithoutType>
</Route>

// ...

const QuizPageWithType = () => {
  // https://reacttraining.com/react-router/web/api/Hooks/useparams
  const { type, quizId } = useParams();

  return <QuizPage type={type} quizId={quizId}>
}

// ...

const QuizPageWithoutType = () => {
  const { quizId } = useParams();

  return <QuizPage quizId={quizId}>
}

Kokonaisuus

lauraleonilla commented 4 years ago

Ok! Kiitos palautteesta! :) @Kaltsoon