diff --git a/front/src/components/main/ProjectContribution.tsx b/front/src/components/main/ProjectContribution.tsx index 5c8dd54..0e90b8e 100644 --- a/front/src/components/main/ProjectContribution.tsx +++ b/front/src/components/main/ProjectContribution.tsx @@ -7,10 +7,17 @@ import { PolarAngleAxis, ResponsiveContainer, } from "recharts"; +import { useUser } from "../frames/token/UserContext"; import refresh from "../../images/refresh.png"; import mainData from "../graph/GraphData/mainData"; +import subData1 from "../graph/GraphData/subData1"; function ProjectContribution() { + const [user] = useUser(); + const currentNickname = user ? user.nickname : "권순호"; + + const activeData = currentNickname === "권순호" ? mainData : subData1; + return (
@@ -22,11 +29,9 @@ function ProjectContribution() { />
- {/* 부모 요소의 크기 조정 */}
- {/* RadarChart 영역 */} - + { async function fetchData(): Promise { try { - const response = await axios.get('questions?writer-id=2'); + const response = await axios.get("questions?writer-id=2"); setAgoraData(response.data); console.log(response.data, response.status); } catch (error) { @@ -38,7 +38,7 @@ function Agora() { }, []); const activeStyle = { - background: '#D8F1FF', + background: "#D8F1FF", }; return ( @@ -50,9 +50,9 @@ function Agora() {
- {' '} + {" "}
    -
  • + {/*
  • 테스트 질문

    @@ -61,7 +61,7 @@ function Agora() { alt='agoraIcon' src={profileImg} /> - sample + 최정훈

    2023.05.20

    개발

    @@ -77,17 +77,17 @@ function Agora() { src={moveImg} /> -
  • + */}
  • -

    테스크 post 질문

    +

    post 질문

    agoraIcon - sample + 최정훈

    2023.05.26

    개발

    diff --git a/front/src/pages/agora/Question.tsx b/front/src/pages/agora/Question.tsx index 1f7cdbb..b4c0189 100644 --- a/front/src/pages/agora/Question.tsx +++ b/front/src/pages/agora/Question.tsx @@ -1,9 +1,9 @@ -import React, { useState, useEffect } from 'react'; -import axios from 'axios'; -import { NavLink } from 'react-router-dom'; -import profileImg from '../../images/members.png'; -import backImg from '../../images/rightarrow.png'; -import Menu from '../../components/frames/Side/Sidebar'; +import React, { useState, useEffect } from "react"; +import axios from "axios"; +import { NavLink } from "react-router-dom"; +import profileImg from "../../images/members.png"; +import backImg from "../../images/rightarrow.png"; +import Menu from "../../components/frames/Side/Sidebar"; interface Answer { content: string; @@ -25,7 +25,7 @@ interface Comment { function Question() { const [data, setData] = useState({ - content: '', + content: "", answerId: 1, }); @@ -42,9 +42,9 @@ function Question() { const answerData = { content: data.content, }; - axios.post('answer-comments', answerData).then((response) => { + axios.post("answer-comments", answerData).then((response) => { console.log(response.status, response.data); - window.location.replace('/Question'); + window.location.replace("/Question"); }); }; @@ -53,7 +53,7 @@ function Question() { useEffect(() => { async function fetchData(): Promise { try { - const response = await axios.get('answer-comment/1'); + const response = await axios.get("answer-comment/1"); setCommentData(response.data); console.log(response.data); } catch (error) { @@ -64,7 +64,7 @@ function Question() { }, []); const activeStyle = { - background: '#D8F1FF', + background: "#D8F1FF", }; return ( @@ -89,7 +89,7 @@ function Question() { alt='agoraIcon' src={profileImg} /> - sample + 최정훈

    2023.05.20

    개발

    @@ -104,7 +104,7 @@ function Question() { alt='agoraIcon' src={profileImg} /> - sample + 최정훈

    작성자 추가 질문 테스트입니다. diff --git a/front/src/pages/agora/Question1.tsx b/front/src/pages/agora/Question1.tsx index 20b28a2..c1accfb 100644 --- a/front/src/pages/agora/Question1.tsx +++ b/front/src/pages/agora/Question1.tsx @@ -1,9 +1,9 @@ -import React, { useState, useEffect } from 'react'; -import axios from 'axios'; -import { NavLink } from 'react-router-dom'; -import profileImg from '../../images/members.png'; -import backImg from '../../images/rightarrow.png'; -import Menu from '../../components/frames/Side/Sidebar'; +import React, { useState, useEffect } from "react"; +import axios from "axios"; +import { NavLink } from "react-router-dom"; +import profileImg from "../../images/members.png"; +import backImg from "../../images/rightarrow.png"; +import Menu from "../../components/frames/Side/Sidebar"; interface Answer { content: string; @@ -25,7 +25,7 @@ interface Comment { function Question1() { const [data, setData] = useState({ - content: '', + content: "", answerId: 1, }); @@ -42,9 +42,9 @@ function Question1() { const answerData = { content: data.content, }; - axios.post('answer-comments', answerData).then((response) => { + axios.post("answer-comments", answerData).then((response) => { console.log(response.status, response.data); - window.location.replace('/Question'); + window.location.replace("/Question"); }); }; @@ -53,7 +53,7 @@ function Question1() { useEffect(() => { async function fetchData(): Promise { try { - const response = await axios.get('answer-comment/1'); + const response = await axios.get("answer-comment/1"); setCommentData(response.data); console.log(response.data); } catch (error) { @@ -64,7 +64,7 @@ function Question1() { }, []); const activeStyle = { - background: '#D8F1FF', + background: "#D8F1FF", }; return ( @@ -82,14 +82,14 @@ function Question1() {

-

테스크 post 질문

+

post 질문

agoraIcon - sample + 최정훈

2023.05.26

개발

@@ -109,7 +109,7 @@ function Question1() { alt='agoraIcon' src={profileImg} /> - sample + 최정훈

summary: string; description: string; contributePoint: string; diff --git a/front/src/pages/main/DashBoard.tsx b/front/src/pages/main/DashBoard.tsx index c40656e..6d27efc 100644 --- a/front/src/pages/main/DashBoard.tsx +++ b/front/src/pages/main/DashBoard.tsx @@ -1,9 +1,9 @@ -import React from 'react'; -import Menu from '../../components/frames/Side/Sidebar'; -import Calendar from '../../components/main/DailyCalendar'; -import CheckListBox from '../../components/main/CheckListBox'; -import Progress from '../../components/main/ProjectProgress'; -import Contribution from '../../components/main/ProjectContribution'; +import React from "react"; +import Menu from "../../components/frames/Side/Sidebar"; +import Calendar from "../../components/main/DailyCalendar"; +import CheckListBox from "../../components/main/CheckListBox"; +import Progress from "../../components/main/ProjectProgress"; +import Contribution from "../../components/main/ProjectContribution"; function MainPage() { return ( diff --git a/front/src/pages/sprint/Sprint.tsx b/front/src/pages/sprint/Sprint.tsx index d8ae1da..51488be 100644 --- a/front/src/pages/sprint/Sprint.tsx +++ b/front/src/pages/sprint/Sprint.tsx @@ -34,7 +34,7 @@ function Sprint() { useEffect(() => { async function fetchData(): Promise { try { - const response = await axios.get("sprints?project-id=5"); + const response = await axios.get("sprints?project-id=2"); setSprintData(response.data); console.log(response.data, response.status); } catch (error) {