Skip to content
This repository has been archived by the owner on Sep 20, 2024. It is now read-only.

Commit

Permalink
fix(ProblemAddModal) : wrong props passing in lectureName
Browse files Browse the repository at this point in the history
  • Loading branch information
kasterra committed May 26, 2024
1 parent 9e13c23 commit b1fb9b4
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions app/routes/_procted+/lectures+/$lectureId+/_layout/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,11 @@ interface DetailProps {
title: string;
}

const PracticeDetail = ({ id, setSuperIsLoading }: DetailProps) => {
const PracticeDetail = ({
id,
setSuperIsLoading,
lectureName,
}: DetailProps) => {
const auth = useAuth();
const navigate = useNavigate();
const [loading, setLoading] = useState(true);
Expand Down Expand Up @@ -273,7 +277,7 @@ const PracticeDetail = ({ id, setSuperIsLoading }: DetailProps) => {
>
{practiceDetail!.problems.map((problem) => (
<ProblemDetail
lectureName={practiceDetail!.title}
lectureName={lectureName}
key={problem.id}
superId={id}
setSuperIsLoading={setLoading}
Expand Down Expand Up @@ -310,7 +314,7 @@ const PracticeDetail = ({ id, setSuperIsLoading }: DetailProps) => {
setIsProblemAddModalOpen(false);
setLoading(true);
}}
lectureName={practiceDetail!.title}
lectureName={lectureName}
practiceName={practiceDetail!.title}
practiceId={practiceDetail!.id}
/>
Expand Down

0 comments on commit b1fb9b4

Please sign in to comment.