File tree Expand file tree Collapse file tree 2 files changed +0
-16
lines changed
Frontend/src/components/user Expand file tree Collapse file tree 2 files changed +0
-16
lines changed Original file line number Diff line number Diff line change @@ -34,24 +34,9 @@ const HistoryAttempt = ({ attempt }) => {
34
34
< td > { questionTitle } </ td >
35
35
< td > { new Date ( startTime ) . toLocaleString ( ) } </ td >
36
36
< 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 >
44
37
</ tr >
45
38
) ;
46
39
} ;
47
40
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
- } ;
56
41
57
42
export default HistoryAttempt ;
Original file line number Diff line number Diff line change @@ -32,7 +32,6 @@ const HistoryTable = ({userID}) => {
32
32
< th > Question</ th >
33
33
< th > Start Time</ th >
34
34
< th > Duration</ th >
35
- < th > Code</ th >
36
35
</ tr >
37
36
</ thead >
38
37
< tbody >
You can’t perform that action at this time.
0 commit comments