Skip to content

Commit

Permalink
Linting fixes
Browse files Browse the repository at this point in the history
Signed-off-by: Joe Fusco <[email protected]>
  • Loading branch information
josephfusco committed Oct 17, 2023
1 parent e142f6a commit 0e388ab
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 7 deletions.
5 changes: 4 additions & 1 deletion components/DocsSidebarNavigation.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,10 @@ import { gql } from '@apollo/client'

DocsSidebarNavigation.fragment = gql`
fragment DocsSidebarNavigationFragment on RootQuery {
docsSidebarMenuItems: menuItems(first: 100, where: { location: DOCS_SIDEBAR }) {
docsSidebarMenuItems: menuItems(
first: 100
where: { location: DOCS_SIDEBAR }
) {
nodes {
id
label
Expand Down
8 changes: 6 additions & 2 deletions components/Layout.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,8 @@ export function Layout({ data, children, toc, title }) {
parentKey: 'parentId',
})
: []
let docsSidebarAllLinks = docsSidebarNavigation?.flatMap((section) => section.links) ?? []
let docsSidebarAllLinks =
docsSidebarNavigation?.flatMap((section) => section.links) ?? []
let linkIndex = docsSidebarAllLinks.findIndex((link) => {
return link.href === data?.node?.uri
})
Expand Down Expand Up @@ -119,7 +120,10 @@ export function Layout({ data, children, toc, title }) {
<div className="absolute bottom-0 right-0 top-16 hidden h-12 w-px bg-gradient-to-t from-slate-800 dark:block" />
<div className="absolute bottom-0 right-0 top-28 hidden w-px bg-slate-800 dark:block" />
<div className="sticky top-[4.5rem] -ml-0.5 h-[calc(100vh-4.5rem)] w-64 overflow-y-auto overflow-x-hidden py-16 pl-0.5 pr-8 xl:w-72 xl:pr-16">
<DocsSidebarNavigation data={data} navigation={docsSidebarNavigation} />
<DocsSidebarNavigation
data={data}
navigation={docsSidebarNavigation}
/>
</div>
</div>
<div className="min-w-0 max-w-2xl flex-auto px-4 py-16 lg:max-w-none lg:pl-8 lg:pr-0 xl:px-16">
Expand Down
8 changes: 6 additions & 2 deletions components/LayoutArchive.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@ export function LayoutArchive({ data, children, title }) {
parentKey: 'parentId',
})
: []
let docsSidebarAllLinks = docsSidebarNavigation?.flatMap((section) => section.links) ?? []
let docsSidebarAllLinks =
docsSidebarNavigation?.flatMap((section) => section.links) ?? []
let section = docsSidebarAllLinks.find((section) =>
section.links.find((link) => link.href === data?.node?.uri),
)
Expand All @@ -45,7 +46,10 @@ export function LayoutArchive({ data, children, title }) {
<div className="absolute bottom-0 right-0 top-16 hidden h-12 w-px bg-gradient-to-t from-slate-800 dark:block" />
<div className="absolute bottom-0 right-0 top-28 hidden w-px bg-slate-800 dark:block" />
<div className="sticky top-[4.5rem] -ml-0.5 h-[calc(100vh-4.5rem)] w-64 overflow-y-auto overflow-x-hidden py-16 pl-0.5 pr-8 xl:w-72 xl:pr-16">
<DocsSidebarNavigation data={data} navigation={docsSidebarNavigation} />
<DocsSidebarNavigation
data={data}
navigation={docsSidebarNavigation}
/>
</div>
</div>
<div className="min-w-0 max-w-2xl flex-auto px-4 py-16 lg:max-w-none lg:pl-8 lg:pr-0 xl:px-16">
Expand Down
5 changes: 4 additions & 1 deletion components/MobileNavigation.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,10 @@ export function MobileNavigation({ navigation }) {
<Logo className="h-auto w-9" />
</Link>
</div>
<DocsSidebarNavigation navigation={navigation} className="mt-5 px-1" />
<DocsSidebarNavigation
navigation={navigation}
className="mt-5 px-1"
/>
</Dialog.Panel>
</Dialog>
</>
Expand Down
2 changes: 1 addition & 1 deletion wp-templates/IndexTemplate.js
Original file line number Diff line number Diff line change
Expand Up @@ -127,4 +127,4 @@ ${blocks.CoreHeading.fragments.entry}
${Layout.fragment}
`

IndexTemplate.variables = ({ uri }) => ({ uri })
IndexTemplate.variables = ({ uri }) => ({ uri })

0 comments on commit 0e388ab

Please sign in to comment.