Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"bracketSpacing": true
}
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@
"@types/react-dom": "^19",
"eslint": "^9",
"eslint-config-next": "16.0.0",
"prettier": "^3.8.1",
"tailwindcss": "^4",
"tw-animate-css": "^1.4.0",
"typescript": "^5"
Expand Down
53 changes: 17 additions & 36 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,9 @@ interface ContinueActions {
function QuestionTestPage({ params: paramsPromise }: QuestionTestPageProps) {
// Get course info from URI
const params = React.use(paramsPromise);
const course = decodeURI(params.courseCode);
const unit = decodeURI(params.unitName);
const subtopic = decodeURI(params.subtopicName);
const course = decodeURIComponent(params.courseCode);
const unit = decodeURIComponent(params.unitName);
const subtopic = decodeURIComponent(params.subtopicName);

const authFetch = useAuthFetch();

Expand Down Expand Up @@ -236,20 +236,6 @@ function QuestionTestPage({ params: paramsPromise }: QuestionTestPageProps) {
</p>
</QuestionPage.AnswerTitle>
<div className="flex flex-col gap-4">
{submitSuccess && correctOptionId && (
<div>
<h1 className="font-poppins font-bold text-2xl">
The correct answer is:
</h1>
<p className="font-poppins text-2xl">
{
question?.options.find(
(option) => option.public_id === correctOptionId,
)?.content
}
</p>
</div>
)}
{submitSuccess && solution && (
<div>
<h2 className="font-poppins font-semibold text-lg">Why?</h2>
Expand Down
Loading