From 2c1f9638c1b8a52d07947f5698f3ef091b7728fa Mon Sep 17 00:00:00 2001 From: Choejeonghun Date: Fri, 8 Sep 2023 11:45:38 +0900 Subject: [PATCH] =?UTF-8?q?test:=20demo=20=EC=98=81=EC=83=81=EC=9D=84=20?= =?UTF-8?q?=EC=9C=84=ED=95=9C=20=EC=BD=94=EB=93=9C=20=EC=A0=95=EB=A6=AC=20?= =?UTF-8?q?=EB=B0=8F=20=ED=85=8C=EC=8A=A4=ED=8A=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/main/ProjectContribution.tsx | 11 +++++-- front/src/pages/agora/Agora.tsx | 30 +++++++++---------- front/src/pages/agora/Question.tsx | 26 ++++++++-------- front/src/pages/agora/Question1.tsx | 28 ++++++++--------- front/src/pages/main/DashBoard.tsx | 12 ++++---- front/src/pages/sprint/Sprint.tsx | 2 +- 6 files changed, 57 insertions(+), 52 deletions(-) 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) {