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) => )}