diff --git a/client/src/components/MarketComponents/MarketStockList.tsx b/client/src/components/MarketComponents/MarketStockList.tsx
index 5080db5..10c2b03 100644
--- a/client/src/components/MarketComponents/MarketStockList.tsx
+++ b/client/src/components/MarketComponents/MarketStockList.tsx
@@ -1,6 +1,7 @@
import axios from "axios";
import { useState, useEffect } from "react";
import styled from "styled-components";
+import { motion } from "framer-motion";
import { useDispatch } from "react-redux";
import { changeCompanyId } from "../../reducer/CompanyId-Reducer";
import logo from "../../asset/icon/StockHolmImage.png";
@@ -104,61 +105,63 @@ const MarketStockList: React.FC = () => {
return (
-
-
- {MarketStockLists.stockName}
-
-
- {MarketStockLists.stockPrice}
-
-
- {MarketStockLists.stockRate}
-
-
- {MarketStockLists.stockTrade}
-
-
-
- 순위
- 종목명
- 현재가(원)
- 변동률(%)
- 거래량(주)
-
-
-
- {marketStockList.slice(0, 10).map((el, index) => {
- const companyLogo = logos[el.korName] || logo;
-
- return (
-
-
dispatch(changeCompanyId(el.companyId))}>
- {isLoading === true ? (
- {MarketStockLists.isLoading}
- ) : (
- <>
-
-
-
- {el.korName}
- {el.code}
-
-
-
- {numberWithCommas(parseFloat(el.stockInfResponseDto.stck_prpr))}
- 0 ? "positive" : parseFloat(el.stockInfResponseDto.prdy_ctrt) < 0 ? "negative" : "neutral"}>
- {el.stockInfResponseDto.prdy_ctrt}
-
- {numberWithCommas(parseFloat(el.stockInfResponseDto.acml_vol))}
-
-
- >
- )}
-
-
- );
- })}
-
+
+
+
+ {MarketStockLists.stockName}
+
+
+ {MarketStockLists.stockPrice}
+
+
+ {MarketStockLists.stockRate}
+
+
+ {MarketStockLists.stockTrade}
+
+
+
+ 순위
+ 종목명
+ 현재가(원)
+ 변동률(%)
+ 거래량(주)
+
+
+
+ {marketStockList.slice(0, 10).map((el, index) => {
+ const companyLogo = logos[el.korName] || logo;
+
+ return (
+
+
dispatch(changeCompanyId(el.companyId))}>
+ {isLoading === true ? (
+ {MarketStockLists.isLoading}
+ ) : (
+ <>
+
+
+
+ {el.korName}
+ {el.code}
+
+
+
+ {numberWithCommas(parseFloat(el.stockInfResponseDto.stck_prpr))}
+ 0 ? "positive" : parseFloat(el.stockInfResponseDto.prdy_ctrt) < 0 ? "negative" : "neutral"}>
+ {el.stockInfResponseDto.prdy_ctrt}
+
+ {numberWithCommas(parseFloat(el.stockInfResponseDto.acml_vol))}
+
+
+ >
+ )}
+
+
+ );
+ })}
+
+
);
};
diff --git a/client/src/components/MarketComponents/index.tsx b/client/src/components/MarketComponents/index.tsx
index 1699785..90d3b97 100644
--- a/client/src/components/MarketComponents/index.tsx
+++ b/client/src/components/MarketComponents/index.tsx
@@ -1,3 +1,4 @@
+import { motion } from "framer-motion";
import styled from "styled-components";
import naver_logo from "../../asset/logos/naver_logo.png";
import daum_logo from "../../asset/logos/daum_logo.png";
@@ -10,30 +11,32 @@ import MarketkospiChart from "./MarketKospiChart";
const MarketSummary: React.FC = () => {
return (
- {SummaryText.now}
-
-
-
-
- {SummaryText.liveNews}
-
-
-
{SummaryText.naverNews}
-
-
-
{SummaryText.daumNews}
-
-
-
{SummaryText.chosunNews}
-
-
-
{SummaryText.dongaNews}
-
-
-
{SummaryText.jtbcNews}
-
-
-
+
+ {SummaryText.now}
+
+
+
+
+ {SummaryText.liveNews}
+
+
+
{SummaryText.naverNews}
+
+
+
{SummaryText.daumNews}
+
+
+
{SummaryText.chosunNews}
+
+
+
{SummaryText.dongaNews}
+
+
+
{SummaryText.jtbcNews}
+
+
+
+
);
};
diff --git a/client/src/components/Profile/CashModal.tsx b/client/src/components/Profile/CashModal.tsx
index 5912600..a81b80b 100644
--- a/client/src/components/Profile/CashModal.tsx
+++ b/client/src/components/Profile/CashModal.tsx
@@ -87,7 +87,7 @@ const CashModal: React.FC<{ onClose: () => void }> = ({ onClose }) => {
return (
-
+
×
{titleText}
diff --git a/client/src/components/Profile/memberInfoModal.tsx b/client/src/components/Profile/memberInfoModal.tsx
index ababce3..d609138 100644
--- a/client/src/components/Profile/memberInfoModal.tsx
+++ b/client/src/components/Profile/memberInfoModal.tsx
@@ -25,7 +25,7 @@ const MemberInfoModal: React.FC = ({ onClose }) => {
return (
-
+
×
{titleText}
diff --git a/client/src/components/Profile/memberWithdrawalModal.tsx b/client/src/components/Profile/memberWithdrawalModal.tsx
index 495e425..5d6d585 100644
--- a/client/src/components/Profile/memberWithdrawalModal.tsx
+++ b/client/src/components/Profile/memberWithdrawalModal.tsx
@@ -30,7 +30,7 @@ const MemberWithdrawalModal: React.FC = ({ onClose,
return (
-
+
×
{withdrawalTitle}
diff --git a/client/src/components/StockOrderSection/Index.tsx b/client/src/components/StockOrderSection/Index.tsx
index 09dbed8..3f019d5 100644
--- a/client/src/components/StockOrderSection/Index.tsx
+++ b/client/src/components/StockOrderSection/Index.tsx
@@ -1,5 +1,6 @@
import { useSelector, useDispatch } from "react-redux";
import { styled } from "styled-components";
+import { CircleLoader } from "react-spinners";
import useGetStockInfo from "../../hooks/useGetStockInfo";
import useGetStockData from "../../hooks/useGetStockData";
import useGetCash from "../../hooks/useGetCash";
@@ -13,6 +14,7 @@ import StockOrder from "./StockOrder";
import OrderResult from "./OrderResult";
import WaitOrderIndicator from "./WaitOrderIndicator";
+const loadingText: string = "로딩 중...";
const errorMessage: string = "정보를 불러올 수 없습니다";
const errorButtonText: string = "닫기";
const loginRequiredText: string = "로그인이 필요한 서비스입니다";
@@ -39,16 +41,29 @@ const StockOrderSection: React.FC = (props) => {
const isLoading = stockInfoLoading || stockPriceLoading || cashLoading || orderRecordLoading || holdingStockLoading || compnayListLoading;
const isError = stockInfoError || stockPriceError || orderRecordError || holdingStockError || companyListError;
- // 1) 데이터 로딩 중
- if (isLoading) {
- return ;
- }
-
// 주식주문 창 닫기
const handleStockOrderClose = () => {
dispatch(stockOrderClose());
};
+ // 1) 데이터 로딩 중
+ if (isLoading) {
+ return (
+
+
+ {upperbarTitle}
+
+
+
+
+ );
+ }
+
// 2) 데이터 받아오기 실패 or 성공했으나 빈 데이터일 때
if (isError || stockPrice.length === 0) {
return (
@@ -170,6 +185,19 @@ const Container = styled.aside<{ orderSet: boolean }>`
box-shadow: -1px 0px 10px darkgray;
background-color: #ffffff;
+ .loading {
+ height: 85%;
+ display: flex;
+ flex-direction: column;
+ justify-content: center;
+ align-items: center;
+
+ .loadingText {
+ margin-top: 20px;
+ color: #9999;
+ }
+ }
+
.mainContent {
height: 100%;
}
diff --git a/client/src/components/communityComponents/index.tsx b/client/src/components/communityComponents/index.tsx
index 1f0f318..039b8c5 100644
--- a/client/src/components/communityComponents/index.tsx
+++ b/client/src/components/communityComponents/index.tsx
@@ -1,5 +1,6 @@
import { useState, useEffect } from "react";
import styled from "styled-components";
+import { motion } from "framer-motion";
import Comments from "./Comments";
import { DotIcon } from "./IconComponent/Icon";
import { toast } from "react-toastify";
@@ -153,56 +154,58 @@ const TimeLineComponent = () => {
};
return (
-
- {openDropDown === false && }
- {openDropDown === true && (
- <>
-
-
-
- Submit
- Cancel
-
- >
- )}
-
-
- {boardData.length === 0 ? (
- {timeLineText.notYetWriting}
- ) : (
- boardData
- .slice()
- .reverse()
- .map((el: BoardData) => (
-
-
- handleDotOpen(el.boardId)}>
-
-
- {dotMenuOpenMap[el.boardId] && handleDeleteClick(el.boardId)}>{timeLineText.delete}}
-
-
-
- {el.member}
- {getTimeAgoString(el.createdAt)}
-
-
- {expandedPosts.includes(el.boardId) ? (
- el.content
- ) : (
- <>
- {el.content.length > 50 ? el.content.substring(0, 50) + "..." : el.content}
-
- {el.content.length > 50 && toggleExpandPost(el.boardId)}>더 보기
}
- >
- )}
-
-
-
- ))
+
+
+ {openDropDown === false && }
+ {openDropDown === true && (
+ <>
+
+
+
+ Submit
+ Cancel
+
+ >
)}
-
-
+
+
+ {boardData.length === 0 ? (
+ {timeLineText.notYetWriting}
+ ) : (
+ boardData
+ .slice()
+ .reverse()
+ .map((el: BoardData) => (
+
+
+ handleDotOpen(el.boardId)}>
+
+
+ {dotMenuOpenMap[el.boardId] && handleDeleteClick(el.boardId)}>{timeLineText.delete}}
+
+
+
+ {el.member}
+ {getTimeAgoString(el.createdAt)}
+
+
+ {expandedPosts.includes(el.boardId) ? (
+ el.content
+ ) : (
+ <>
+ {el.content.length > 50 ? el.content.substring(0, 50) + "..." : el.content}
+
+ {el.content.length > 50 && toggleExpandPost(el.boardId)}>더 보기
}
+ >
+ )}
+
+
+
+ ))
+ )}
+
+
+
);
};
diff --git a/client/src/components/stockinfoComponents/StockInfoDummyData.tsx b/client/src/components/stockinfoComponents/StockInfoDummyData.tsx
deleted file mode 100644
index e69de29..0000000
diff --git a/client/src/components/stockinfoComponents/index.tsx b/client/src/components/stockinfoComponents/index.tsx
index 4104626..a6c599c 100644
--- a/client/src/components/stockinfoComponents/index.tsx
+++ b/client/src/components/stockinfoComponents/index.tsx
@@ -1,4 +1,5 @@
import styled from "styled-components";
+import { motion } from "framer-motion";
import { useState } from "react";
import { useSelector } from "react-redux";
import { RootState } from "../../store/config";
@@ -446,120 +447,118 @@ const DetailStockInformation: React.FC = () => {
return (
- {matchingCompany ? (
-
-
-
-
-
+
+ {matchingCompany ? (
+
+
+
+
+
-
- {matchingCompany.company.companyName}
- {matchingCompany.company.companyKospi}
-
-
-
- {moreView === true ? (
-
- {matchingCompany.company.companySkill.sk1}
- {matchingCompany.company.companySkill.sk2}
- {matchingCompany.company.companySkill.sk3}
- {matchingCompany.company.companySkill.sk4}
- {matchingCompany.company.companySkill.sk5}
- {matchingCompany.company.companySkill.sk6}
- {DetailStockText.moreView}
-
- ) : (
-
- {matchingCompany.company.companySkill.sk1}
- {matchingCompany.company.companySkill.sk2}
- {DetailStockText.moreView}
-
- )}
-
-
-
-
-
- -
-
{DetailStockText.stock}
-
- - {matchingCompany.company.companyStock}
-
-
- -
-
{DetailStockText.indust}
-
- - {matchingCompany.company.compnayIndustrial}
-
-
-
-
-
- {moreView2 === true ? (
+
+ {matchingCompany.company.companyName}
+ {matchingCompany.company.companyKospi}
+
+
+
+ {moreView === true ? (
+
+ {matchingCompany.company.companySkill.sk1}
+ {matchingCompany.company.companySkill.sk2}
+ {matchingCompany.company.companySkill.sk3}
+ {matchingCompany.company.companySkill.sk4}
+ {matchingCompany.company.companySkill.sk5}
+ {matchingCompany.company.companySkill.sk6}
+ {DetailStockText.moreView}
+
+ ) : (
+
+ {matchingCompany.company.companySkill.sk1}
+ {matchingCompany.company.companySkill.sk2}
+ {DetailStockText.moreView}
+
+ )}
+
+
-
-
{DetailStockText.companyEx}
+ {DetailStockText.companyValue}
- - {matchingCompany.company.companyExample}
- - {matchingCompany.company.companyExample2}
- - {matchingCompany.company.companyExample3}
- - {matchingCompany.company.companyExample4}
-
- {moreView2 ? DetailStockText.lessView : DetailStockText.moreView}
-
+ -
+
{matchingCompany.company.companyValue}
+
+
+
+
+ -
+
{DetailStockText.stock}
+
+ - {matchingCompany.company.companyStock}
- ) : (
- )}
-
-
-
-
-
-
-
- ) : (
- {DetailStockText.plzPickTheStock}
- )}
+
+
+
+
+ {moreView2 === true ? (
+
+ ) : (
+
+ )}
+
+
+
+
+
+
+
+ ) : (
+ {DetailStockText.plzPickTheStock}
+ )}
+
);
};
-//companyAsset: {
-// total: "자산총계" + "4,480,005.60" + "억",
-//lentRatio: "19.87" + "%",
-// assetRatio: "80.13" + "%",
-//}
+
export default DetailStockInformation;
const DetailStockText = {
plzPickTheStock: "종목을 선택 해 주세요",
diff --git a/client/src/components/watchlist/WatchList.tsx b/client/src/components/watchlist/WatchList.tsx
index 14838a2..01d9076 100644
--- a/client/src/components/watchlist/WatchList.tsx
+++ b/client/src/components/watchlist/WatchList.tsx
@@ -45,7 +45,7 @@ const WatchList: React.FC = ({ currentListType, onChangeListType
{isLoading ? (
- Loading...
+
) : isError ? (
Error fetching data
) : loginStatus === 1 ? (