Skip to content

Commit

Permalink
style: 작성페이지 왼쪽 사이드바 숨김
Browse files Browse the repository at this point in the history
디자인 시안 반영
  • Loading branch information
Yongveloper committed Apr 8, 2024
1 parent 96dadfc commit 0401668
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions src/widgets/common-layout/common-layout.tsx
Original file line number Diff line number Diff line change
@@ -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";
Expand All @@ -21,6 +21,7 @@ const Main = styled.main`
`;

const LeftSideBars = styled.section`
min-width: 184px;
display: flex;
flex-direction: column;
justify-content: flex-start;
Expand All @@ -29,15 +30,23 @@ const LeftSideBars = styled.section`
`;

export const CommonLayout = () => {
const location = useLocation();

const isWritePage = location.pathname === "/question/write";

return (
<>
<Header />
<Banner />
<Top />
<Main>
<LeftSideBars>
<ReviewerRank />
<LanguageRank />
{!isWritePage && (
<>
<ReviewerRank />
<LanguageRank />
</>
)}
</LeftSideBars>
<Outlet />
<QuestionGuide />
Expand Down

0 comments on commit 0401668

Please sign in to comment.