diff --git a/client/src/components/MarketComponents/MarketKospiChart.tsx b/client/src/components/MarketComponents/MarketKospiChart.tsx index c49103db..5cd7e341 100644 --- a/client/src/components/MarketComponents/MarketKospiChart.tsx +++ b/client/src/components/MarketComponents/MarketKospiChart.tsx @@ -77,7 +77,7 @@ const MarketkospiChart = () => { symbol: "none", sampling: "lttb", itemStyle: { - color: function (params) { + color: function (params: any) { // 주식 상승이면 빨간색, 하락이면 파란색 반환 return params.data[1] >= params.data[0] ? "rgb(255, 0, 0)" @@ -97,26 +97,28 @@ const MarketkospiChart = () => { ]), }, - data: kospiData.map((item, index, array) => { - const currentPrice = parseFloat(item.bstp_nmix_oprc); - const previousPrice = - index > 0 - ? parseFloat(array[index - 1].bstp_nmix_oprc) - : currentPrice; + data: kospiData.map( + (item: KospiProps, index: number, array: KospiProps[]) => { + const currentPrice = parseFloat(item.bstp_nmix_oprc); + const previousPrice = + index > 0 + ? parseFloat(array[index - 1].bstp_nmix_oprc) + : currentPrice; - // 현재 가격과 이전 가격을 비교하여 색상 설정 - const color = - currentPrice > previousPrice - ? "rgb(255, 0, 0)" - : "rgb(0, 0, 255)"; + // 현재 가격과 이전 가격을 비교하여 색상 설정 + const color = + currentPrice > previousPrice + ? "rgb(255, 0, 0)" + : "rgb(0, 0, 255)"; - return { - value: currentPrice, - itemStyle: { - color: color, - }, - }; - }), + return { + value: currentPrice, + itemStyle: { + color: color, + }, + }; + } + ), }, ], grid: { diff --git a/client/src/components/communityComponents/Comments.tsx b/client/src/components/communityComponents/Comments.tsx index c980e439..1e290ba1 100644 --- a/client/src/components/communityComponents/Comments.tsx +++ b/client/src/components/communityComponents/Comments.tsx @@ -48,11 +48,6 @@ const Comments = ({ postId }: { postId: number }) => { setVisibleComments(close ? 1 : commentData.length); }; - const CommentText = { - write: "작성", - replyCount: `댓글${commentData.length}개 모두보기`, - }; - return (
diff --git a/client/src/page/TabPages/TabContainerPage.tsx b/client/src/page/TabPages/TabContainerPage.tsx index f44fcddc..cbcb8d5d 100644 --- a/client/src/page/TabPages/TabContainerPage.tsx +++ b/client/src/page/TabPages/TabContainerPage.tsx @@ -2,10 +2,15 @@ import MarketInfo from "./MarketInfoPage"; import { Routes, Route, Link } from "react-router-dom"; import styled from "styled-components"; import { DetailStockInformation } from "../../components/stockListComponents/DetailStockInformation"; -import { Community } from "./CommunityPage"; +import { Community } from "./communityPage"; import { Status } from "../../components/statusComponents"; import { useState } from "react"; -import { MarketImages, InfoImages, CommunityImages, InvestImage } from "../../components/communityComponents/IconComponent/Icon"; +import { + MarketImages, + InfoImages, + CommunityImages, + InvestImage, +} from "../../components/communityComponents/IconComponent/Icon"; export const TabContainerPage = () => { const [activeTab, setActiveTab] = useState(1); const handleClickActiveTab = (number: number) => { @@ -14,23 +19,42 @@ export const TabContainerPage = () => { return ( - +
-