From 2e0328f3f22dfbdc89612dfee69b5e8069eae5ee Mon Sep 17 00:00:00 2001 From: chayoosang Date: Wed, 11 Oct 2023 14:52:05 +0900 Subject: [PATCH] =?UTF-8?q?[PDW-54]=20fix:=20=EC=9E=90=EC=9B=90=20?= =?UTF-8?q?=EC=98=88=EC=95=BD=20=EC=B9=B4=EB=93=9C=20=ED=81=B4=EB=A6=AD?= =?UTF-8?q?=EC=8B=9C=20=EC=83=81=EC=84=B8=20=EC=98=88=EC=95=BD=ED=8E=98?= =?UTF-8?q?=EC=9D=B4=EC=A7=80=EB=A1=9C=20=EB=84=98=EC=96=B4=EA=B0=80?= =?UTF-8?q?=EA=B2=8C=20=EC=84=A4=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/resourceInfo/ResourceInfo.js | 11 ++++++++++- src/pages/booking/selectResource/SelectResource.js | 4 +++- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/src/components/resourceInfo/ResourceInfo.js b/src/components/resourceInfo/ResourceInfo.js index f8769fa..5aa85c1 100644 --- a/src/components/resourceInfo/ResourceInfo.js +++ b/src/components/resourceInfo/ResourceInfo.js @@ -3,6 +3,7 @@ import styled from "styled-components" import Example from '../../assets/images/example.png' import Capsule from "components/capsule/Capsule"; import { ResourceCard, CardText, DetailContainer, ResourceCardImage, InfoContainer, DescriptionContainer, OfficeContentText, ResourceTitle } from "components/card/Card"; +import { useNavigate } from "react-router-dom"; // 자원명 컨테이너 const ResourceTitleContainer = styled.div` @@ -12,9 +13,17 @@ const ResourceTitleContainer = styled.div` ` + + + function ResourceInfo(props) { + const moveToDetail = () => { + window.location.href = "/resourceBooking/"+props.resourceId + } + + return ( - + diff --git a/src/pages/booking/selectResource/SelectResource.js b/src/pages/booking/selectResource/SelectResource.js index e612e42..87150fc 100644 --- a/src/pages/booking/selectResource/SelectResource.js +++ b/src/pages/booking/selectResource/SelectResource.js @@ -5,6 +5,7 @@ import React, { useState, useEffect } from "react"; import styled from "styled-components"; import ResourceInfo from "components/resourceInfo/ResourceInfo"; import { ResourcesAxios } from "api/AxiosApi"; +import { useNavigate } from "react-router-dom"; export const SearchTitleContainer = styled.div` @@ -61,6 +62,7 @@ export const SearchDateInput = styled.input` ` function SelectResource(props) { + const navigate = useNavigate(); const [resourceList, setResourceList] = useState([]); const [resourceName, setResourceName] = useState(""); @@ -118,7 +120,7 @@ function SelectResource(props) {
- {resourceList.length === 0 ? : resourceList.map((resource) => )} + {resourceList.length === 0 ? : resourceList.map((resource, index) => )}