Skip to content

Conversation

@Mjdelima20
Copy link
Collaborator

@Mjdelima20 Mjdelima20 commented Nov 30, 2023

Asana

[Commands]

  • npm start

[Pre-conditions]

  1. After running the command , you will redirect to front page
  2. add /result in the URL

note: if you want to change the score, access frontend folder
- access src
- access dummyresult.tsx
- match the answer to correct_answer

[Expected Output]

  • Display the Category Title
  • Display the score and the total items
  • User can able to see its correct and wrong answers

[Screenshots]

Details

image

results.mp4

@escbooster12-dev escbooster12-dev self-requested a review December 1, 2023 03:13
import Done from "../components/common/Done";
import Navbar from "../components/common/Navbar";
import QuizHeader from "../components/common/QuizHeader";
import DummyTest from "../dummytest";
Copy link
Collaborator

Choose a reason for hiding this comment

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

For dummy data, please store it in the exact location where it is being used since this is temporary and removable in the future

apply to all related

@@ -0,0 +1,67 @@
import ChoicesButton from "../components/common/ChoicesButton";
import Done from "../components/common/Done";
import Navbar from "../components/common/Navbar";
Copy link
Collaborator

Choose a reason for hiding this comment

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

can you setup module path alias.


const LessonAnswerPage = () => {
const Items = DummyTest.length;
const [question, setQuestion] = useState(0);
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
const [question, setQuestion] = useState(0);
const [questionIndex, setQuestionIndex] = useState(0);

import { useState } from "react";

const LessonAnswerPage = () => {
const Items = DummyTest.length;
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
const Items = DummyTest.length;
const totalQuestions = DummyTest.length;

import Done from "../components/common/Done";
import Navbar from "../components/common/Navbar";
import QuizHeader from "../components/common/QuizHeader";
import DummyTest from "../dummytest";
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
import DummyTest from "../dummytest";
import dummyQuestions from "../dummyQuestions";

Comment on lines 15 to 17
if (isCorrect === true) {
setScore(score + 1);
}
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
if (isCorrect === true) {
setScore(score + 1);
}
if (isCorrect) {
setScore(score + 1);
}

Copy link
Collaborator

@escbooster12-dev escbooster12-dev left a comment

Choose a reason for hiding this comment

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

fix comemnts

Copy link
Collaborator

@escbooster12-dev escbooster12-dev left a comment

Choose a reason for hiding this comment

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

The PR requires refactoring and proper structuring. Let's begin by addressing the essential configurations for this PR.

I'd like you to set up:

  • Eslint
  • Prettier
  • Typescript
  • Husky

Please create a separate a task and a PR to implement the above setup alongside the module import changes you made in this PR. Do the setup for each frontend and backend

You may follow this as reference

@Mjdelima20 Mjdelima20 self-assigned this Jan 8, 2024
Comment on lines 2 to 8
import HomePage from '../Pages/Homepage';
import CategoryPage from '../Pages/Categorypage';
import LoginPage from '../Pages/auth/LoginPage';
import SignUp from '../Pages/auth/SignupPage';
import AdminLogin from '../Pages/auth/AdminLogin';
import AdminSignin from '../Pages/auth/AdminSignUp';
import Dashboard from '../Pages/Dashboard';
Copy link
Collaborator

Choose a reason for hiding this comment

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

path alias

</p>

<Link to={'#resultspage'}>
<Link to={'/category/1/result'}>
Copy link
Collaborator

Choose a reason for hiding this comment

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

why is this static to 1?

Comment on lines 10 to 21
return (
<>
<div
className={clsx('text-gray-700', {
'mx-[6rem] w-[5rem] ': question === true,
'mx-[11rem]': !question,
})}
>
{answer}
</div>
</>
);
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
return (
<>
<div
className={clsx('text-gray-700', {
'mx-[6rem] w-[5rem] ': question === true,
'mx-[11rem]': !question,
})}
>
{answer}
</div>
</>
);
return (
<div
className={clsx('text-gray-700', {
'mx-[6rem] w-[5rem] ': question === true,
'mx-[11rem]': !question,
})}
>
{answer}
</div>
);

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.

3 participants