diff --git a/src/components/Container/index.tsx b/src/components/Container/index.tsx index d8a2a60..4849eb8 100644 --- a/src/components/Container/index.tsx +++ b/src/components/Container/index.tsx @@ -1,11 +1,9 @@ import React, { PropsWithChildren } from "react" import * as SC from "./styles" -function Container({ +export function Container({ children, ...restProps }: PropsWithChildren<{}>): JSX.Element { return {children} } - -export default Container diff --git a/src/components/DocsLayout/index.tsx b/src/components/DocsLayout/index.tsx index e393248..119dd2e 100644 --- a/src/components/DocsLayout/index.tsx +++ b/src/components/DocsLayout/index.tsx @@ -8,11 +8,11 @@ import React, { PropsWithChildren } from "react" import { useStaticQuery, graphql } from "gatsby" -import DocsSidebar from "../DocsSidebar" -import Footer from "../Footer" +import { DocsSidebar } from "../DocsSidebar" +import { Footer } from "../Footer" import * as SC from "./styles" -function DocsLayout({ children }: PropsWithChildren<{}>) { +export function DocsLayout({ children }: PropsWithChildren<{}>) { const data = useStaticQuery(graphql` query { site { @@ -36,5 +36,3 @@ function DocsLayout({ children }: PropsWithChildren<{}>) { ) } - -export default DocsLayout diff --git a/src/components/DocsSidebar/index.tsx b/src/components/DocsSidebar/index.tsx index 691deb4..81d7478 100644 --- a/src/components/DocsSidebar/index.tsx +++ b/src/components/DocsSidebar/index.tsx @@ -84,7 +84,7 @@ function Folder({ item }: { item: IFolder }) { ) } -function DocsSidebar() { +export function DocsSidebar() { const docs = useStaticQuery(ALL_DOCS) const tree = useBuildTree(docs) @@ -94,5 +94,3 @@ function DocsSidebar() { ) } - -export default DocsSidebar diff --git a/src/components/DocsSidebarSection/index.tsx b/src/components/DocsSidebarSection/index.tsx index 587ddd1..8396c06 100644 --- a/src/components/DocsSidebarSection/index.tsx +++ b/src/components/DocsSidebarSection/index.tsx @@ -5,7 +5,7 @@ export interface DocsSidebarSectionProps { readonly title: string } -function DocsSidebarSection({ +export function DocsSidebarSection({ title, children, }: PropsWithChildren) { @@ -16,5 +16,3 @@ function DocsSidebarSection({ ) } - -export default DocsSidebarSection diff --git a/src/components/Footer/index.tsx b/src/components/Footer/index.tsx index 289cf04..ec60265 100644 --- a/src/components/Footer/index.tsx +++ b/src/components/Footer/index.tsx @@ -1,8 +1,8 @@ import React from "react" import * as SC from "./styles" -import Container from "../Container" +import { Container } from "../Container" -function Footer() { +export function Footer() { return ( @@ -13,5 +13,3 @@ function Footer() { ) } - -export default Footer diff --git a/src/components/Layout/index.tsx b/src/components/Layout/index.tsx index f9efd41..796e261 100644 --- a/src/components/Layout/index.tsx +++ b/src/components/Layout/index.tsx @@ -8,15 +8,15 @@ import React, { PropsWithChildren } from "react" import { useStaticQuery, graphql } from "gatsby" -import Container from "../Container" -import Footer from "../Footer" -import Sidebar from "../Sidebar" +import { Container } from "../Container" +import { Footer } from "../Footer" +import { Sidebar } from "../Sidebar" import "./layout.scss" import * as SC from "./styles" import Scrollbar from "react-perfect-scrollbar" import "react-perfect-scrollbar/dist/css/styles.css" -function Layout({ children }: PropsWithChildren<{}>) { +export function Layout({ children }: PropsWithChildren<{}>) { const data = useStaticQuery(graphql` query { site { @@ -42,5 +42,3 @@ function Layout({ children }: PropsWithChildren<{}>) { ) } - -export default Layout diff --git a/src/components/SEO/index.tsx b/src/components/SEO/index.tsx index 6c3d872..6597c85 100644 --- a/src/components/SEO/index.tsx +++ b/src/components/SEO/index.tsx @@ -10,7 +10,7 @@ interface SEOProps { readonly title: string } -function SEO({ +export function SEO({ description, lang = "en", meta = [], @@ -86,5 +86,3 @@ function SEO({ /> ) } - -export default SEO diff --git a/src/components/Sidebar/index.tsx b/src/components/Sidebar/index.tsx index 6d33338..9c29190 100644 --- a/src/components/Sidebar/index.tsx +++ b/src/components/Sidebar/index.tsx @@ -11,7 +11,7 @@ function MenuItem({ children, to }: PropsWithChildren<{ to: string }>) { ) } -function Sidebar() { +export function Sidebar() { return ( @@ -27,5 +27,3 @@ function Sidebar() { ) } - -export default Sidebar diff --git a/src/pages/404.tsx b/src/pages/404.tsx index 0b82e4e..788f166 100644 --- a/src/pages/404.tsx +++ b/src/pages/404.tsx @@ -1,7 +1,7 @@ import React from "react" -import Layout from "../components/Layout" -import SEO from "../components/SEO" +import { Layout } from "../components/Layout" +import { SEO } from "../components/SEO" function NotFoundPage() { return ( diff --git a/src/pages/docs.tsx b/src/pages/docs.tsx index 1a13229..d7e9399 100644 --- a/src/pages/docs.tsx +++ b/src/pages/docs.tsx @@ -1,7 +1,7 @@ import React from "react" -import DocsLayout from "../components/DocsLayout" -import SEO from "../components/SEO" +import { DocsLayout } from "../components/DocsLayout" +import { SEO } from "../components/SEO" function DocsPage() { return ( diff --git a/src/pages/index.tsx b/src/pages/index.tsx index c2d3c0b..589c218 100644 --- a/src/pages/index.tsx +++ b/src/pages/index.tsx @@ -1,8 +1,8 @@ import React from "react" import { Link } from "gatsby" -import Layout from "../components/Layout" -import SEO from "../components/SEO" +import { Layout } from "../components/Layout" +import { SEO } from "../components/SEO" function IndexPage() { return ( diff --git a/src/templates/languagePost.tsx b/src/templates/languagePost.tsx index bec0944..4f83889 100644 --- a/src/templates/languagePost.tsx +++ b/src/templates/languagePost.tsx @@ -1,7 +1,7 @@ import React from "react" import { graphql } from "gatsby" -import SEO from "../components/SEO" -import DocsLayout from "../components/DocsLayout" +import { SEO } from "../components/SEO" +import { DocsLayout } from "../components/DocsLayout" // @todo maybe find alternative type for data function LanguagePost({ data }: any) {