-
Notifications
You must be signed in to change notification settings - Fork 1
[SELS-TASK]-[FE]-Mockup Results Page #16
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
base: main
Are you sure you want to change the base?
Conversation
| import Done from "../components/common/Done"; | ||
| import Navbar from "../components/common/Navbar"; | ||
| import QuizHeader from "../components/common/QuizHeader"; | ||
| import DummyTest from "../dummytest"; |
There was a problem hiding this comment.
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"; | |||
There was a problem hiding this comment.
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); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| const [question, setQuestion] = useState(0); | |
| const [questionIndex, setQuestionIndex] = useState(0); |
| import { useState } from "react"; | ||
|
|
||
| const LessonAnswerPage = () => { | ||
| const Items = DummyTest.length; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| 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"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| import DummyTest from "../dummytest"; | |
| import dummyQuestions from "../dummyQuestions"; |
| if (isCorrect === true) { | ||
| setScore(score + 1); | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| if (isCorrect === true) { | |
| setScore(score + 1); | |
| } | |
| if (isCorrect) { | |
| setScore(score + 1); | |
| } |
escbooster12-dev
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fix comemnts
There was a problem hiding this 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
71a16f5 to
2d250e8
Compare
frontend/src/Routes/routes.tsx
Outdated
| 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'; |
There was a problem hiding this comment.
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'}> |
There was a problem hiding this comment.
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?
| return ( | ||
| <> | ||
| <div | ||
| className={clsx('text-gray-700', { | ||
| 'mx-[6rem] w-[5rem] ': question === true, | ||
| 'mx-[11rem]': !question, | ||
| })} | ||
| > | ||
| {answer} | ||
| </div> | ||
| </> | ||
| ); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| 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> | |
| ); |
Asana
[Commands]
npm start[Pre-conditions]
/resultin the URLnote: if you want to change the score, access frontend folder
- access src
- access dummyresult.tsx
- match the answer to correct_answer
[Expected Output]
[Screenshots]
Details
results.mp4