Skip to content

Commit

Permalink
Merge pull request #85 from PLADI-ALM/feat/PDW-37-manager-resource-ad…
Browse files Browse the repository at this point in the history
…d-api

[PDW-37/fix] 자원 추가 axios로 변경 및 자원 예약 이미지 추가
  • Loading branch information
psyeon1120 authored Oct 16, 2023
2 parents 4583280 + c8fbf3d commit 1c09dd1
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 13 deletions.
4 changes: 2 additions & 2 deletions src/components/resourceInfo/ResourceInfo.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ function ResourceInfo(props) {
return (
<ResourceCard onClick={props.detail===true ? moveToDetail : {}}>
<DetailContainer>
<ResourceCardImage src={Example} />
<ResourceCardImage src={props.imgUrl} />

<InfoContainer>
<ResourceTitleContainer isHidden={props.isTItleHidden}>
Expand All @@ -47,4 +47,4 @@ function ResourceInfo(props) {
);
}

export default ResourceInfo;
export default ResourceInfo;
2 changes: 1 addition & 1 deletion src/pages/booking/selectResource/SelectResource.js
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ function SelectResource(props) {

<WhiteContainer>
<div className="cardList">
{resourceList.length === 0 ? <label>예약 가능한 자원이 없습니다.</label> : resourceList.map((resource, index) => <ResourceInfo key={resource.index} detail={true} resourceId={resource.resourceId} name={resource.name} image={resource.imgUrl} category={resource.category} description={resource.description} />)}
{resourceList.length === 0 ? <label>예약 가능한 자원이 없습니다.</label> : resourceList.map((resource, index) => <ResourceInfo key={resource.index} detail={true} resourceId={resource.resourceId} name={resource.name} imgUrl={resource.imgUrl} category={resource.category} description={resource.description} />)}
</div>
</WhiteContainer>
</RightContainer>
Expand Down
11 changes: 1 addition & 10 deletions src/pages/manager/resourceManage/ResourceManageAdd.js
Original file line number Diff line number Diff line change
Expand Up @@ -196,17 +196,8 @@ function ResourceManageAdd(props) {
};

const getImageUrl = () => {



if (imageFile !== null) {
const data = {
'ext' : String(imageFile.type.split("/", 2)[1]),
'dir' : "photo"
};
const config = {"Content-Type": 'application/json'};

axios.post("https://gpkzpnv8lh.execute-api.ap-northeast-2.amazonaws.com/dev/presignedurl-lambda", data, config)
ImageUrlAxios.get(`?ext=${imageFile.type.split("/", 2)[1]}&dir=photo`)
.then((Response) => {
alert(Response)
})
Expand Down

0 comments on commit 1c09dd1

Please sign in to comment.