Skip to content

Commit

Permalink
fix(qrcodeComponent): remove taskIndex
Browse files Browse the repository at this point in the history
  • Loading branch information
NSUWAL123 committed Nov 11, 2024
1 parent d766e4b commit 7873108
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ const TaskSelectionPopup = ({ taskId, body, feature }: TaskSelectionPopupPropTyp
{/* only display qr code component render inside taskPopup on mobile screen */}
<div className="sm:fmtm-hidden">
{checkIfTaskAssignedOrNot && task_state !== 'LOCKED_FOR_MAPPING' && (
<QrcodeComponent projectId={currentProjectId} taskIndex={selectedTask.index} />
<QrcodeComponent projectId={currentProjectId} />
)}
</div>
{body}
Expand Down
5 changes: 2 additions & 3 deletions src/frontend/src/components/QrcodeComponent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,13 @@ import { GetProjectQrCode } from '@/api/Files';

type tasksComponentType = {
projectId?: string;
taskIndex?: number;
};

const QrcodeComponent = ({ projectId, taskIndex }: tasksComponentType) => {
const QrcodeComponent = ({ projectId }: tasksComponentType) => {
const downloadQR = () => {
const downloadLink = document.createElement('a');
downloadLink.href = qrcode;
downloadLink.download = `Project_${projectId}_Task_${taskIndex}`;
downloadLink.download = `Project_${projectId}`;
downloadLink.click();
};

Expand Down

0 comments on commit 7873108

Please sign in to comment.