Skip to content

Commit

Permalink
요청작 상세페이지 수아 입맛대로 고치기 완료
Browse files Browse the repository at this point in the history
  • Loading branch information
SingTheCode committed Jul 28, 2021
1 parent 1a524b5 commit fec8106
Show file tree
Hide file tree
Showing 7 changed files with 74 additions and 14 deletions.
1 change: 1 addition & 0 deletions src/data/http/authApi.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
import API from "./axios/api";
11 changes: 11 additions & 0 deletions src/data/http/axios/api.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import axios from "axios";

const API = axios.create({
baseURL: "http://localhost:3000",
headers: {
"Content-Type": "application/json",
},
withCredentials: true,
});

export default API;
30 changes: 30 additions & 0 deletions src/data/http/requestProjectApi.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
import API from "./axios/api";

export default class requestProjectApiProvider {
async readRequestProjects() {
try {
const { data } = await API.get("/req-projects");
return data;
} catch (err) {
console.log(err);
}
}

async readContributeProjects() {
try {
const { data } = await API.get("/req-projects:{request_id}");
return data;
} catch (err) {
console.log(err);
}
}

async updateRequestProject() {
try {
const { data } = await API.put("/req-projects:{request_id}");
return data;
} catch (err) {
console.log(err);
}
}
}
4 changes: 4 additions & 0 deletions src/presentation/page/detailProject/RightBox.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@ function RightBox() {
<styled.Title>The Great Escape</styled.Title>
<AudioPlayer
style={{
position: "absolute",
right: "4.5vw",
top: "200px",
width: "1000px",
display: "flex",
justifyContent: "flex-start",
boxShadow: "none",
Expand Down
27 changes: 18 additions & 9 deletions src/presentation/page/detailProject/styled.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ const LeftBox = styled.div`
width: 58vw;
height: 88vh;
background-color: #fafafa;
z-index: 1;
`;

const LeftHeader = styled.header`
Expand Down Expand Up @@ -119,6 +120,7 @@ const RightBox = styled.div`
const Title = styled.div`
width: 30vw;
height: 88px;
padding-left: 50px;
font-family: NotoSansKR;
font-size: 30px;
font-weight: bold;
Expand All @@ -136,16 +138,16 @@ const ProjectStates = styled.div`
align-items: center;
width: 37vw;
height: 10vh;
padding: 40px 20px;
padding: 160px 20px 40px 50px;
`;

const RequestField = styled.div`
display: flex;
justify-content: space-evenly;
flex-direction: column;
align-items: flex-start;
width: 190px;
height: 90px;
width: 240px;
height: 120px;
border-radius: 10px;
background-color: #fffcf2;
`;
Expand All @@ -155,6 +157,8 @@ const RequestFieldTitle = styled.div`
justify-content: space-evenly;
width: 70px;
height: 20px;
padding-left: 20px;
font-family: NotoSansKR;
font-size: 14px;
font-weight: 600;
Expand Down Expand Up @@ -195,8 +199,8 @@ const RequestGenre = styled.div`
flex-direction: column;
justify-content: space-evenly;
align-items: flex-start;
width: 190px;
height: 90px;
width: 240px;
height: 120px;
border-radius: 10px;
background-color: #fffcf2;
`;
Expand All @@ -206,6 +210,7 @@ const RequestGenreTitle = styled.div`
justify-content: space-evenly;
width: 55px;
height: 20px;
padding-left: 20px;
font-family: NotoSansKR;
font-size: 14px;
font-weight: 600;
Expand Down Expand Up @@ -238,8 +243,10 @@ const RequestMood = styled.div`
flex-direction: column;
justify-content: space-evenly;
align-items: flex-start;
width: 190px;
height: 90px;
width: 240px;
height: 120px;
padding-left: 20px;
border-radius: 10px;
background-color: #fffcf2;
`;
Expand Down Expand Up @@ -279,7 +286,7 @@ const RequestMoodItems = styled.div`
const RequestText = styled.div`
width: 37vw;
height: 20vh;
padding: 20px 20px 100px 20px;
padding: 20px 20px 100px 50px;
font-family: NotoSansKR;
font-size: 14px;
font-weight: 600;
Expand Down Expand Up @@ -315,6 +322,7 @@ const RequestProfile = styled.div`
const ProfileImage = styled.img`
width: 100px;
height: 100px;
padding-left: 50px;
`;

const RequestContext = styled.div`
Expand All @@ -330,6 +338,7 @@ const RequestContext = styled.div`
const RequestEmail = styled.div`
width: 30vw;
height: 10vh;
padding-top: 30px;
font-family: NotoSansKR;
font-size: 20px;
font-weight: 600;
Expand All @@ -343,7 +352,7 @@ const RequestEmail = styled.div`

const RequestIntroduce = styled.div`
width: 35vw;
height: 10vh;
height: 20vh;
font-family: NotoSansKR;
font-size: 14px;
font-weight: 600;
Expand Down
11 changes: 8 additions & 3 deletions src/presentation/page/main/Project.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,18 @@ import React, { useState, useEffect } from "react";
import styled from "./styled";
import axios from "axios";

// const readRequestProjects = async () => {
// try {
// const { data } = await API.get("/req-projects");
// return data;
// } catch (err) {
// console.log(err);
// }
// };
function Project() {
const [projects, setProjects] = useState(null);
const [loading, setLoading] = useState(false);
const [error, setError] = useState(null);
const [page, setPage] = useState(1);
const [start, setStart] = useState(0);
const [end, setEnd] = useState(8);

useEffect(() => {
const fetchProjects = async () => {
Expand Down
4 changes: 2 additions & 2 deletions src/presentation/page/main/styled.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,8 @@ const ProjectBox = styled.div`
flex-wrap: wrap;
justify-content: center;
align-items: center;
width: 85%;
height: 100%;
width: 85vw;
height: 100vh;
`;

const Project = styled.div`
Expand Down

0 comments on commit fec8106

Please sign in to comment.