From 0401668a4d3137e6e6983c1269b8228b1c85cec2 Mon Sep 17 00:00:00 2001 From: yongveloper Date: Mon, 8 Apr 2024 20:26:41 +0900 Subject: [PATCH] =?UTF-8?q?style:=20=EC=9E=91=EC=84=B1=ED=8E=98=EC=9D=B4?= =?UTF-8?q?=EC=A7=80=20=EC=99=BC=EC=AA=BD=20=EC=82=AC=EC=9D=B4=EB=93=9C?= =?UTF-8?q?=EB=B0=94=20=EC=88=A8=EA=B9=80=20=EB=94=94=EC=9E=90=EC=9D=B8=20?= =?UTF-8?q?=EC=8B=9C=EC=95=88=20=EB=B0=98=EC=98=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/widgets/common-layout/common-layout.tsx | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/src/widgets/common-layout/common-layout.tsx b/src/widgets/common-layout/common-layout.tsx index 25ef330..1d7db16 100644 --- a/src/widgets/common-layout/common-layout.tsx +++ b/src/widgets/common-layout/common-layout.tsx @@ -1,4 +1,4 @@ -import { Outlet } from "react-router-dom"; +import { Outlet, useLocation } from "react-router-dom"; import styled from "styled-components"; import { Banner } from "~/shared/banner"; @@ -21,6 +21,7 @@ const Main = styled.main` `; const LeftSideBars = styled.section` + min-width: 184px; display: flex; flex-direction: column; justify-content: flex-start; @@ -29,6 +30,10 @@ const LeftSideBars = styled.section` `; export const CommonLayout = () => { + const location = useLocation(); + + const isWritePage = location.pathname === "/question/write"; + return ( <>
@@ -36,8 +41,12 @@ export const CommonLayout = () => {
- - + {!isWritePage && ( + <> + + + + )}