[web] interviews/qns: add props to hide arrow in the question card

This commit is contained in:
Nitesh Seram 2024-11-16 21:14:08 +05:30
parent 00922a568a
commit 8a625a3f75
2 changed files with 15 additions and 10 deletions

View File

@ -341,6 +341,7 @@ export default function InterviewsMarketingPracticeQuestionBankSection({
0, 0,
MAX_TO_SHOW, MAX_TO_SHOW,
)} )}
showArrowRight={false}
showOverlayAtLastItem={ showOverlayAtLastItem={
questionsWithCompletionStatus.length >= MAX_TO_SHOW questionsWithCompletionStatus.length >= MAX_TO_SHOW
} }

View File

@ -48,6 +48,7 @@ type Props<Q extends QuestionMetadata> = Readonly<{
primaryLabel?: 'difficulty' | 'importance'; primaryLabel?: 'difficulty' | 'importance';
questionCompletionCount?: QuestionCompletionCount; questionCompletionCount?: QuestionCompletionCount;
questions: ReadonlyArray<Q>; questions: ReadonlyArray<Q>;
showArrowRight?: boolean;
showOverlayAtLastItem?: boolean; showOverlayAtLastItem?: boolean;
showProgress?: boolean; showProgress?: boolean;
}>; }>;
@ -65,6 +66,7 @@ export default function QuestionsList<Q extends QuestionMetadata>({
onMarkAsCompleted, onMarkAsCompleted,
onMarkAsNotCompleted, onMarkAsNotCompleted,
showOverlayAtLastItem, showOverlayAtLastItem,
showArrowRight = true,
mode = 'default', mode = 'default',
}: Props<Q>) { }: Props<Q>) {
const { userProfile } = useUserProfile(); const { userProfile } = useUserProfile();
@ -241,6 +243,7 @@ export default function QuestionsList<Q extends QuestionMetadata>({
})()} })()}
</div> </div>
</div> </div>
{showArrowRight && (
<div className="flex items-center justify-center"> <div className="flex items-center justify-center">
<RiArrowRightLine <RiArrowRightLine
aria-hidden="true" aria-hidden="true"
@ -251,6 +254,7 @@ export default function QuestionsList<Q extends QuestionMetadata>({
)} )}
/> />
</div> </div>
)}
</div> </div>
{onQuestionClickIntercept && ( {onQuestionClickIntercept && (
<span <span