Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 2 additions & 5 deletions .env
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
REACT_APP_SERVER_URL = http://3.39.223.179:8080

REACT_APP_SERVER_URL = http://3.39.6.18:8080/

REACT_APP_SERVER_URL = http://13.209.14.99:8080

# http://3.39.6.18:8080/
REACT_APP_REST_API_KEY = 94c5891ab6cec1f5eddede64f8358dd9
16,656 changes: 16,656 additions & 0 deletions package-lock.json

Large diffs are not rendered by default.

4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,9 @@
"react": "^18.2.0",
"react-cookie": "^4.1.1",
"react-dom": "^18.2.0",
"react-hook-form": "^7.43.4",
"react-hook-form": "^7.43.5",
"react-hook-form-resolvers": "^0.0.1",
"react-icons": "^4.8.0",
"react-query": "^3.39.3",
"react-redux": "^8.0.5",
"react-router": "^6.8.2",
Expand Down
1 change: 1 addition & 0 deletions src/App.jsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { QueryClient, QueryClientProvider } from "react-query";

import { GlobalStyle } from "./Globalstyle";

import Router from "./router/Router";
Expand Down
11 changes: 10 additions & 1 deletion src/api/api.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import instance from "./instance";
import axios from "axios";

//////////////로 그 인 ///////

const loginUser = async (userId) => {
return await instance.post(`/api/users/login`, userId);
};
Expand All @@ -22,6 +23,7 @@ const addRoom = async (formData) => {
export { addRoom, getRoom, loginUser, signUpUser };

// ---------------곽세령이 짠 거------------------

const getCard = async () => {
const response = await instance.get("/api/houses");
return response.data;
Expand All @@ -36,7 +38,14 @@ const getDetail = async (houseid) => {

export {getDetail}

// ---------------곽세령이 짠 거 ------------------

const addReview = async (houseid) => {
return await instance.post(`/api/houses/${houseid}/reviews`, houseid);
};

export {addReview}


// ---------------곽세령이 짠 거 ------------------


85 changes: 45 additions & 40 deletions src/components/card/Card.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,36 +2,42 @@ import React from "react";
import { useNavigate } from "react-router-dom";
import styled from "styled-components";

import { RiHeart3Line, RiHeart3Fill } from "react-icons/ri";
import { BsStarFill } from "react-icons/bs";

const Card = ({ item }) => {
const navigate = useNavigate();
return (
<CardBox>
<ImgBox>
<ImgBox
onClick={() => {
navigate(`/${item.id}`);
}}
>
<ImgView src={item.imageUrl} alt="img" />
<Heart>♡</Heart>
<RiHeart3Line className="HeartLogo" />
<RiHeart3Fill className="HeartLogoBottom" />
</ImgBox>
<CardHeaderBox>
<Title
key={item.id}
onClick={() => {
navigate(`/:${item.id}`);
navigate(`/${item.id}`);
}}
>
{item.title}
{item.location}
</Title>
<StarBox>
<Star>★</Star>
<BsStarFill className="StarLogo" />
<Count>{item.likesNum}</Count>
</StarBox>
</CardHeaderBox>
<CardInfoBox>
<LocationBox>{item.location}</LocationBox>
<LocationBox>{item.distance}km 거리</LocationBox>
<PriceBox>₩{item.price}/박</PriceBox>
</CardInfoBox>
</CardBox>
);

};

export default Card;
Expand All @@ -48,9 +54,8 @@ const PriceBox = styled.div`
`;

const CardBox = styled.div`
width: 300px;
height: 400px;
text-align: center;
width: 250px;
height: 350px;
`;

const Title = styled.div`
Expand All @@ -61,19 +66,44 @@ const Title = styled.div`
font-weight: bold;
`;

const ImgBox = styled.div`
width: 300px;
height: 300px;
const StarBox = styled.div`
gap: 5px;
display: flex;
flex-direction: row;
margin-top: 2px;
.StarLogo {
font-size: 14px;
color: black;
margin-top: 10px;
}
`;

const ImgBox = styled.div`
width: 250px;
height: 250px;
position: relative;
background-color: gray;
border-radius: 15px;
cursor: pointer;
.HeartLogo {
position: absolute;
top: 10%;
left: 80%;
font-size: 30px;
color: white;
}
.HeartLogoBottom {
position: absolute;
top: 10%;
left: 80%;
font-size: 30px;
color: #00000057;
}
`;

const ImgView = styled.img`
width: 300px;
height: 300px;
width: 250px;
height: 250px;
border-radius: 15px;
`;

Expand All @@ -85,33 +115,8 @@ const Count = styled.div`
margin-top: 0px;
`;

const Star = styled.div`
/* width: 20px;
height: 20px; */
font-size: 20px;
/* position: absolute;
top: 80%;
left: 80%; */
color: black;
`;

const Heart = styled.div`
font-size: 25px;
position: absolute;
top: 0%;
left: 80%;
color: rgba(231, 231, 231, 0.829);
`;

const CardHeaderBox = styled.div`
display: flex;
flex-direction: row;
justify-content: space-between;
`;

const StarBox = styled.div`
gap: 3px;
display: flex;
flex-direction: row;
margin-top: 2px;
`;
8 changes: 6 additions & 2 deletions src/components/footer/Footer.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,13 @@ const Footer = () => {
export default Footer;

const FooterContainer = styled.div`
position: absolute;
/* position: absolute;
z-index: 99;
bottom: 0;
width: 90vw;
padding: 20px;
padding: 20px; */
display: flex;
justify-content: center;
margin-top: 10px;
padding-bottom: 10px;
`;
Loading