diff --git a/src/app/(main)/stock/[id]/page.tsx b/src/app/(main)/stock/[id]/page.tsx index 40bd846..cca27de 100644 --- a/src/app/(main)/stock/[id]/page.tsx +++ b/src/app/(main)/stock/[id]/page.tsx @@ -5,7 +5,7 @@ import { Header } from "./_components/header"; import { InvestmentTip } from "./_components/investment-tip"; import { StockDetailResponse } from "@/api/generated/endpoint.schemas"; import { DividendInfo } from "./_components/dividend-info"; -import { DrawerOverlay, Drawer as DrawerPrimitive } from "@/components/ui/drawer"; +import { DrawerOverlay, DrawerPortal, Drawer as DrawerPrimitive } from "@/components/ui/drawer"; import { StockInfoDrawer } from "./_components/stock-drawer"; const dummyStock: StockDetailResponse = { @@ -30,18 +30,38 @@ export default function StockPage({ params }: { params: { id: string } }) { const handleInfoClick = () => { setShowStockInfo((prevState) => !prevState); }; + + React.useEffect(() => { + // 컴포넌트가 마운트될 때 body 스타일 변경 + document.body.style.setProperty("margin", "auto", "important"); + document.body.style.setProperty("padding", "0"); + + // 컴포넌트가 언마운트될 때 body 스타일 복원 + return () => { + document.body.style.removeProperty("margin"); + document.body.style.removeProperty("padding"); + }; + }, []); + return ( - setShowStockInfo(false)} /> - -
-
- - + + setShowStockInfo(false)} /> + + +
+
+
+ + +
); }