Skip to content

Commit 2ec174b

Browse files
committed
Update History Schema to remove 'code'
1 parent f917b19 commit 2ec174b

File tree

2 files changed

+0
-16
lines changed

2 files changed

+0
-16
lines changed

Frontend/src/components/user/HistoryAttempt.jsx

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -34,24 +34,9 @@ const HistoryAttempt = ({ attempt }) => {
3434
<td>{questionTitle}</td>
3535
<td>{new Date(startTime).toLocaleString()}</td>
3636
<td>{formatDuration(duration)}</td>
37-
{/* Uncomment the below section if you want to enable code download */}
38-
{/* <td>
39-
<button onClick={() => downloadCode(code)} className="btn btn-sm btn-primary">
40-
Download Code
41-
</button>
42-
</td> */}
43-
<td>{code} dummy file content</td>
4437
</tr>
4538
);
4639
};
4740

48-
// Function to download the binary code file
49-
const downloadCode = (file) => {
50-
const blob = new Blob([file], { type: 'application/octet-stream' });
51-
const link = document.createElement('a');
52-
link.href = URL.createObjectURL(blob);
53-
link.download = 'code_attempt.bin';
54-
link.click();
55-
};
5641

5742
export default HistoryAttempt;

Frontend/src/components/user/HistoryTable.jsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@ const HistoryTable = ({userID}) => {
3232
<th>Question</th>
3333
<th>Start Time</th>
3434
<th>Duration</th>
35-
<th>Code</th>
3635
</tr>
3736
</thead>
3837
<tbody>

0 commit comments

Comments
 (0)