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 }) => {
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
5742export default HistoryAttempt ;
Original file line number Diff line number Diff 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 >
You can’t perform that action at this time.
0 commit comments