From c95272e21352b344fd2823371e06d68c83e8933b Mon Sep 17 00:00:00 2001 From: Kamran Ahmed Date: Thu, 9 Nov 2023 21:30:54 +0000 Subject: [PATCH] Update --- .../TeamProgress/MemberProgressModal.tsx | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/src/components/TeamProgress/MemberProgressModal.tsx b/src/components/TeamProgress/MemberProgressModal.tsx index 70d12efa2..81c2942d7 100644 --- a/src/components/TeamProgress/MemberProgressModal.tsx +++ b/src/components/TeamProgress/MemberProgressModal.tsx @@ -12,12 +12,12 @@ import { type ResourceType, updateResourceProgress, } from '../../lib/resource-progress'; -import CloseIcon from '../../icons/close.svg'; import { useToast } from '../../hooks/use-toast'; import { useAuth } from '../../hooks/use-auth'; import { pageProgressMessage } from '../../stores/page'; import { MemberProgressModalHeader } from './MemberProgressModalHeader'; -import {replaceChildren} from "../../lib/dom.ts"; +import { replaceChildren } from '../../lib/dom.ts'; +import { XIcon } from 'lucide-react'; export type ProgressMapProps = { member: TeamMember; @@ -68,12 +68,12 @@ export function MemberProgressModal(props: ProgressMapProps) { teamId: string, memberId: string, resourceType: string, - resourceId: string + resourceId: string, ) { const { error, response } = await httpGet( `${ import.meta.env.PUBLIC_API_URL - }/v1-get-member-resource-progress/${teamId}/${memberId}?resourceType=${resourceType}&resourceId=${resourceId}` + }/v1-get-member-resource-progress/${teamId}/${memberId}?resourceType=${resourceType}&resourceId=${resourceId}`, ); if (error || !response) { toast.error(error?.message || 'Failed to get member progress'); @@ -160,14 +160,14 @@ export function MemberProgressModal(props: ProgressMapProps) { resourceType: resourceType as ResourceType, topicId, }, - newStatus + newStatus, ) .then(() => { renderTopicProgress(topicId, newStatus); getMemberProgress(teamId, member._id, resourceType, resourceId).then( (data) => { setMemberProgress(data); - } + }, ); }) .catch((err) => { @@ -227,7 +227,7 @@ export function MemberProgressModal(props: ProgressMapProps) { e.preventDefault(); updateTopicStatus( topicId, - !isCurrentStatusLearning ? 'learning' : 'pending' + !isCurrentStatusLearning ? 'learning' : 'pending', ); return; } @@ -236,7 +236,7 @@ export function MemberProgressModal(props: ProgressMapProps) { e.preventDefault(); updateTopicStatus( topicId, - !isCurrentStatusSkipped ? 'skipped' : 'pending' + !isCurrentStatusSkipped ? 'skipped' : 'pending', ); return; @@ -298,7 +298,8 @@ export function MemberProgressModal(props: ProgressMapProps) { }`} onClick={onClose} > - {'close'} + + Close modal