Skip to content

Commit

Permalink
[댓글추첨] 유저정보 추가
Browse files Browse the repository at this point in the history
🔨fix:유저 아이디 추가
  • Loading branch information
ImNM authored Aug 10, 2022
2 parents 76e07c4 + e292e04 commit 6dbb615
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 2 deletions.
23 changes: 22 additions & 1 deletion src/components/CommentRandomPage/CommentRandomPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,29 @@ function CommentRandomPage() {
<div>
<Table dataSource={randm ? randm._list : []}>
<Column width={150} title="댓글 고유 아이디" dataIndex="id" />
<Column title="댓글" dataIndex="content" />
<Column width={300} title="댓글" dataIndex="content" />
<Column width={150} title="익명 닉네임" dataIndex="nickName" />
<Column
width={150}
title="유저아이디"
dataIndex="userInfo"
render={userInfo => (userInfo ? userInfo.id : null)}
key="id"
/>
<Column
width={150}
title="유저전번"
dataIndex="userInfo"
render={userInfo => (userInfo ? userInfo.phoneNumber : null)}
key="id"
/>
<Column
width={150}
title="입금자명"
dataIndex="userInfo"
render={userInfo => (userInfo ? userInfo.name : null)}
key="id"
/>
</Table>
</div>
);
Expand Down
2 changes: 1 addition & 1 deletion src/state/actions-creators/randomCom.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { RANDOM_SUCCESS, RANDOM_ERROR } from '../action-types';
export const randomCom = callback => async dispatch => {
try {
const response = await axios.get(
`https://api.gosrock.band/v1/users/random/comment?take=5`
`https://api.gosrock.band/v1/users/random/comment/userInfo?take=5`
);

console.log(response.data);
Expand Down

0 comments on commit 6dbb615

Please sign in to comment.