Skip to content

Commit cfe13da

Browse files
authored
Merge pull request #134 from InserToken/feat/35-pracMain/minseon
[modify] 차트 너비 수정
2 parents 5748ee0 + 410de30 commit cfe13da

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/components/blocks/Investment/InvestmentStock/InvestmentStock.client.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,9 @@ export default function InvestmentStockClient() {
3333
}>();
3434
const [tab, setTab] = useState<"chart" | "finance">("chart");
3535
// === 차트 부모 width 동적 측정 ===
36+
3637
const chartBoxRef = useRef<HTMLDivElement>(null);
37-
const [parentWidth, setParentWidth] = useState(922); // 초기값
38+
const [parentWidth, setParentWidth] = useState(780); // 초기값
3839
const [showLine, setShowLine] = useState({
3940
ma5: true,
4041
ma20: true,
@@ -77,7 +78,7 @@ export default function InvestmentStockClient() {
7778
updateWidth();
7879
window.addEventListener("resize", updateWidth);
7980
return () => window.removeEventListener("resize", updateWidth);
80-
}, []);
81+
}, [allowed, loading]);
8182

8283
const holidaySet = useHolidayStore((state) => state.holidaySet);
8384

src/components/charts/InvestCandleChart.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -504,10 +504,9 @@ export default function InvestCandleChart({
504504
// --- 렌더 ---
505505
return (
506506
<div
507-
className="flex flex-col "
507+
className="flex flex-col w-full"
508508
style={{
509509
width: "100%",
510-
maxWidth: w,
511510
position: "relative",
512511
overflow: "hidden",
513512
background: "inherit",

0 commit comments

Comments
 (0)