Skip to content

Commit 0de1cc5

Browse files
committed
cleanup components
1 parent a5a852d commit 0de1cc5

File tree

1 file changed

+9
-26
lines changed

1 file changed

+9
-26
lines changed

src/layouts/Docs.tsx

Lines changed: 9 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -37,17 +37,6 @@ import YouTube from "@/components/YouTube"
3737
import { cn } from "@/lib/utils/cn"
3838
import { getEditPath } from "@/lib/utils/editPath"
3939

40-
const Page = (props: HTMLAttributes<HTMLDivElement>) => (
41-
<div className="flex w-full flex-col border-b" {...props} />
42-
)
43-
44-
const ContentContainer = (props: HTMLAttributes<HTMLDivElement>) => (
45-
<div
46-
className="flex justify-between bg-background-highlight lg:pe-8"
47-
{...props}
48-
/>
49-
)
50-
5140
const baseHeadingClasses = "font-mono uppercase font-bold scroll-mt-40"
5241

5342
const H1 = (props: HTMLAttributes<HTMLHeadingElement>) => (
@@ -77,15 +66,6 @@ const H4 = (props: HTMLAttributes<HTMLHeadingElement>) => (
7766
<MdHeading4 className={baseSubHeadingClasses} {...props} />
7867
)
7968

80-
const Content = (props: ChildOnlyProp) => {
81-
return (
82-
<MainArticle
83-
className="min-w-0 flex-1 px-8 pb-8 pt-8 md:px-16 md:pb-16 md:pt-12"
84-
{...props}
85-
/>
86-
)
87-
}
88-
8969
const BackToTop = (props: ChildOnlyProp) => (
9070
<div className="display-none mt-12 flex border-t pt-8" {...props}>
9171
<InlineLink href="#top">
@@ -140,16 +120,19 @@ export const DocsLayout = ({
140120
const absoluteEditPath = getEditPath(relativePath)
141121

142122
return (
143-
<Page>
123+
<div className="flex w-full flex-col border-b">
144124
<SideNavMobile path={relativePath} />
145125
{isPageIncomplete && (
146126
<BannerNotification shouldShow={isPageIncomplete}>
147127
<Translation id="page-developers-docs:banner-page-incomplete" />
148128
</BannerNotification>
149129
)}
150-
<ContentContainer dir={contentNotTranslated ? "ltr" : "unset"}>
130+
<div
131+
className="flex justify-between bg-background-highlight lg:pe-8"
132+
dir={contentNotTranslated ? "ltr" : "unset"}
133+
>
151134
<SideNav path={relativePath} />
152-
<Content>
135+
<MainArticle className="min-w-0 flex-1 px-8 pb-8 pt-8 md:px-16 md:pb-16 md:pt-12">
153136
<H1 id="top">{frontmatter.title}</H1>
154137
<FileContributors
155138
contributors={contributors}
@@ -167,7 +150,7 @@ export const DocsLayout = ({
167150
<BackToTop />
168151
<FeedbackCard isArticle />
169152
<DocsNav contentNotTranslated={contentNotTranslated} />
170-
</Content>
153+
</MainArticle>
171154
{tocItems && (
172155
<TableOfContents
173156
editPath={absoluteEditPath}
@@ -177,7 +160,7 @@ export const DocsLayout = ({
177160
pt={isPageIncomplete ? "5rem" : "3rem"}
178161
/>
179162
)}
180-
</ContentContainer>
181-
</Page>
163+
</div>
164+
</div>
182165
)
183166
}

0 commit comments

Comments
 (0)