diff --git a/gatsby-browser.js b/gatsby-browser.js
index b41f255..62e82aa 100644
--- a/gatsby-browser.js
+++ b/gatsby-browser.js
@@ -6,4 +6,4 @@
// You can delete this file if you're not using it
-require('prismjs/themes/prism-tomorrow.css');
+require("prismjs/themes/prism-tomorrow.css")
diff --git a/src/SidebarProvider.tsx b/src/SidebarProvider.tsx
index d1dafb1..b70b137 100644
--- a/src/SidebarProvider.tsx
+++ b/src/SidebarProvider.tsx
@@ -13,15 +13,16 @@ export const SidebarContext = React.createContext ({
- current,
- setCurrent,
- }), [current, setCurrent])
+ const memoizedContextValue = useMemo(
+ () => ({
+ current,
+ setCurrent,
+ }),
+ [current, setCurrent]
+ )
return (
diff --git a/src/components/Container/styles.tsx b/src/components/Container/styles.tsx
index af20a32..f98292c 100644
--- a/src/components/Container/styles.tsx
+++ b/src/components/Container/styles.tsx
@@ -1,4 +1,3 @@
import styled from "styled-components"
-export const ContainerWrapper = styled.div`
- `
+export const ContainerWrapper = styled.div``
diff --git a/src/components/Footer/index.tsx b/src/components/Footer/index.tsx
index 1c7d38b..05b6aaa 100644
--- a/src/components/Footer/index.tsx
+++ b/src/components/Footer/index.tsx
@@ -11,7 +11,6 @@ export function Footer() {
{` `}
Gatsby
-
)
diff --git a/src/components/ResourceBreadcrumb/index.tsx b/src/components/ResourceBreadcrumb/index.tsx
index 5637a8f..ef2b67c 100644
--- a/src/components/ResourceBreadcrumb/index.tsx
+++ b/src/components/ResourceBreadcrumb/index.tsx
@@ -69,14 +69,14 @@ export function ResourceBreadcrumb({ relativePath }: IResourceBreadcrumbProps) {
{breadcrumbItems.map(item => {
if (item.type === "folder") {
return (
-
+
)
}
- return {item.title}
+ return {item.title}
})}
)
diff --git a/src/components/ResourceHeader/styles.tsx b/src/components/ResourceHeader/styles.tsx
index 7846bcf..b9ed884 100644
--- a/src/components/ResourceHeader/styles.tsx
+++ b/src/components/ResourceHeader/styles.tsx
@@ -1,7 +1,7 @@
import { Link } from "gatsby"
+import { darken, lighten } from "polished"
import styled, { css } from "styled-components"
import { fontFamily, modularScale } from "../../design/typography"
-import { darken, lighten } from "polished"
export const ResourceHeaderWrapper = styled.div`
border-bottom: 1px solid #dbdbdb;
diff --git a/src/components/ResourcesLayout/index.tsx b/src/components/ResourcesLayout/index.tsx
index 7d3d20b..a11acad 100644
--- a/src/components/ResourcesLayout/index.tsx
+++ b/src/components/ResourcesLayout/index.tsx
@@ -33,9 +33,7 @@ export function ResourcesLayout({ children }: PropsWithChildren<{}>) {
-
- {children}
-
+ {children}
`
${Children} {
display: ${props => (props.collapsed ? "none" : "flex")};
- /* height: ${props => (props.collapsed ? 0 : "auto")}; */
}
& > ${Label} svg {
diff --git a/src/components/ResourcesSidebar/useBuildTree.tsx b/src/components/ResourcesSidebar/useBuildTree.tsx
index 1240c93..b038b2f 100644
--- a/src/components/ResourcesSidebar/useBuildTree.tsx
+++ b/src/components/ResourcesSidebar/useBuildTree.tsx
@@ -44,7 +44,9 @@ function generateFile({
}
function join([head, ...tail]: IFileOrFolder[]): IFileOrFolder[] {
- if (!head) { return [] }
+ if (!head) {
+ return []
+ }
const [similarFs, remaining] = partition(
obj => obj.title === head.title && obj.type === head.type,
diff --git a/src/pages/about.tsx b/src/pages/about.tsx
index 35b1d92..8305a92 100644
--- a/src/pages/about.tsx
+++ b/src/pages/about.tsx
@@ -1,6 +1,7 @@
import { graphql } from "gatsby"
import React, { Fragment } from "react"
import { MarkdownRemark } from "../../generated/graphql"
+import { ComponentQuery } from "../../typings"
import { Markdown } from "../components/Markdown"
import { SEO } from "../components/SEO"
diff --git a/src/pages/rules.tsx b/src/pages/rules.tsx
index 91df62a..d1a802a 100644
--- a/src/pages/rules.tsx
+++ b/src/pages/rules.tsx
@@ -1,6 +1,7 @@
import { graphql } from "gatsby"
import React, { Fragment } from "react"
import { MarkdownRemark } from "../../generated/graphql"
+import { ComponentQuery } from "../../typings"
import { Markdown } from "../components/Markdown"
import { SEO } from "../components/SEO"