diff --git a/client/src/components/StockOrderSection/Index.tsx b/client/src/components/StockOrderSection/Index.tsx
index 3e1b1d91..c5cc3a10 100644
--- a/client/src/components/StockOrderSection/Index.tsx
+++ b/client/src/components/StockOrderSection/Index.tsx
@@ -28,10 +28,6 @@ const StockOrderSection = () => {
const { stockInfo, stockInfoLoading, stockInfoError } = useGetStockInfo(companyId);
const { stockPrice, stockPriceLoading, stockPriceError } = useGetStockData(companyId);
- console.log(isLogin);
- const localData = localStorage.getItem("authToken");
- console.log(localData);
-
// 주식주문 창 닫기
const handleStockOrderClose = () => {
dispatch(stockOrderClose());
diff --git a/client/src/components/StockOrderSection/StockOrder.tsx b/client/src/components/StockOrderSection/StockOrder.tsx
index 76cac06a..9dac79a4 100644
--- a/client/src/components/StockOrderSection/StockOrder.tsx
+++ b/client/src/components/StockOrderSection/StockOrder.tsx
@@ -3,6 +3,7 @@ import { isHoliday } from "@hyunbinseo/holidays-kr";
import { closeDecisionWindow } from "../../reducer/SetDecisionWindow-Reducer";
import { styled } from "styled-components";
import { StateProps } from "../../models/stateProps";
+import useTradeStock from "../../hooks/useTradeStock";
import StockPriceList from "./StockPriceList";
import StockOrderSetting from "./StockOrderSetting";
@@ -41,6 +42,24 @@ const StockOrder = ({ corpName }: { corpName: string }) => {
dispatch(closeDecisionWindow());
};
+ //🔴 주문 관련 테스트
+ const orderRequest = useTradeStock();
+
+ const handleStockOrder = () => {
+ orderRequest.mutate();
+ const { isLoading, isError } = orderRequest;
+
+ if (isLoading) {
+ console.log("주식 주문 진행 중");
+ }
+
+ if (isError) {
+ console.log("주문 오류 발생");
+ }
+
+ handleCloseDecisionWindow();
+ };
+
// 1) 주말, 공휴일 여부 체크
const today = new Date();
const nonBusinessDay = isHoliday(today, { include: { saturday: true, sunday: true } }); // 토요일, 일요일, 공휴일 (임시 공휴일 포함)
@@ -53,7 +72,9 @@ const StockOrder = ({ corpName }: { corpName: string }) => {
const closingTime = isBefore9AM || isAfter330PM;
// 주문 실패 케이스 1) 개장시간 2) 가격/거래량 설정
- const orderFailureCase01 = nonBusinessDay || closingTime;
+ // 🔴 3시 30분 이후 작업 위해 closingTime 조건 해제
+ const orderFailureCase01 = nonBusinessDay;
+ // const orderFailureCase01 = nonBusinessDay || closingTime;
const orderFailureCase02 = orderPrice === 0 || orderVolume === 0;
return (
@@ -105,7 +126,7 @@ const StockOrder = ({ corpName }: { corpName: string }) => {
-