Skip to content

Commit 3be1543

Browse files
author
ohjunsang
committed
[FIX] student excel download
1 parent 31bb3ef commit 3be1543

File tree

4 files changed

+9
-8
lines changed

4 files changed

+9
-8
lines changed

src/components/Admin_Main/component/MainContent.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ const MainContent = ({
2424
history,
2525
fileDownload,
2626
created_at,
27-
getExcelFile
27+
getExcelFile,
2828
}) => {
2929

3030
const classDataKey = Object.keys(classData);
@@ -144,7 +144,7 @@ const MainContent = ({
144144
<h2>{getTitle(type,title)}</h2>
145145
<div onClick={(e)=> e.stopPropagation()} className="buttonWrapper">
146146
<S.MainFixButton onClick={()=> {history.push(`/Admin/revise/${contentId}`)}}><img src={edit} alt=""/>수정</S.MainFixButton>
147-
{type === 0 ? "" : <S.MainFixButton onClick={() => {getExcelFile(contentId)}}><img src={excel} alt=""/>엑셀</S.MainFixButton>}
147+
<S.MainFixButton onClick={() => {getExcelFile(contentId)}}><img src={excel} alt=""/>엑셀</S.MainFixButton>
148148
<S.MainFixButton onClick={()=>{fileDownload(contentId)}}><img src={download} alt=""/>파일</S.MainFixButton>
149149
</div>
150150
</div>

src/components/Admin_Main/component/MainList.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@ const MainList = ({
1313
text,
1414
contentId,
1515
state,
16-
actions
16+
actions,
17+
isTeam,
1718
}) => {
1819

1920
const { accessToken, refreshToken } = state;
@@ -93,7 +94,7 @@ const MainList = ({
9394
</S.MainListContent>
9495
{
9596
studentList.map(({user_name,user_number,submit}) =>
96-
<MainListContent name={user_name} number={user_number} isChecked={submit} getFile={getFileCode}/>)
97+
<MainListContent name={user_name} number={user_number} isChecked={submit} getFile={getFileCode} isTeam={isTeam}/>)
9798
}
9899
</tbody>
99100
</table>

src/components/Admin_Main/component/MainListContent.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
import React, { useState, useCallback } from 'react';
22
import * as S from '../style/MainStyle';
3-
import { download } from '../imgs'
43
const MainListContent = ({
54
number,
65
name,
76
isChecked,
8-
getFile
7+
getFile,
8+
isTeam,
99
}) => {
1010
const [mouseOver, mouseOverChange] = useState(false);
1111
const mouseOverHandler = useCallback((event)=> {
@@ -20,7 +20,7 @@ const MainListContent = ({
2020
onMouseOut={mouseOutHandler}
2121
>
2222
{
23-
mouseOver ?
23+
mouseOver && !isTeam ?
2424
<td
2525
className="hoverable"
2626
onClick={()=>{getFile(number)}}

src/components/Admin_Main/component/MainTeamClass.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ const MainTeamClass = ({
7676
<AccessTokenConsumer>
7777
{
7878
({ state }) => {
79-
return <MainList studentList={studentList} state={state} text="상호평가"/>
79+
return <MainList studentList={studentList} state={state} text="상호평가" isTeam={true}/>
8080
}
8181
}
8282
</AccessTokenConsumer>

0 commit comments

Comments
 (0)