mirror of
https://github.com/Stone-Red-Code/website.git
synced 2026-09-07 23:43:57 +02:00
refact: extra footer into its own component
This commit is contained in:
@@ -9,6 +9,7 @@ import React, { PropsWithChildren } from "react"
|
|||||||
import { useStaticQuery, graphql } from "gatsby"
|
import { useStaticQuery, graphql } from "gatsby"
|
||||||
|
|
||||||
import DocsSidebar from "../DocsSidebar"
|
import DocsSidebar from "../DocsSidebar"
|
||||||
|
import Footer from "../Footer"
|
||||||
import * as SC from "./styles"
|
import * as SC from "./styles"
|
||||||
|
|
||||||
const DocsLayout = ({ children }: PropsWithChildren<{}>) => {
|
const DocsLayout = ({ children }: PropsWithChildren<{}>) => {
|
||||||
@@ -31,11 +32,7 @@ const DocsLayout = ({ children }: PropsWithChildren<{}>) => {
|
|||||||
{children}
|
{children}
|
||||||
</SC.MainContent>
|
</SC.MainContent>
|
||||||
</SC.Main>
|
</SC.Main>
|
||||||
<footer>
|
<Footer />
|
||||||
© {new Date().getFullYear()}, Built with
|
|
||||||
{` `}
|
|
||||||
<a href="https://www.gatsbyjs.org">Gatsby</a>
|
|
||||||
</footer>
|
|
||||||
</div>
|
</div>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,17 @@
|
|||||||
|
import React from "react"
|
||||||
|
import * as SC from "./styles"
|
||||||
|
import Container from "../Container"
|
||||||
|
|
||||||
|
const Footer = () => {
|
||||||
|
return (
|
||||||
|
<SC.FooterWrapper>
|
||||||
|
<Container>
|
||||||
|
© {new Date().getFullYear()}, Built with
|
||||||
|
{` `}
|
||||||
|
<a href="https://www.gatsbyjs.org">Gatsby</a>
|
||||||
|
</Container>
|
||||||
|
</SC.FooterWrapper>
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
export default Footer
|
||||||
@@ -0,0 +1,4 @@
|
|||||||
|
import { Link } from "gatsby"
|
||||||
|
import styled from "styled-components"
|
||||||
|
|
||||||
|
export const FooterWrapper = styled.footer``
|
||||||
@@ -9,6 +9,7 @@ import React, { PropsWithChildren } from "react"
|
|||||||
import { useStaticQuery, graphql } from "gatsby"
|
import { useStaticQuery, graphql } from "gatsby"
|
||||||
|
|
||||||
import Container from "../Container"
|
import Container from "../Container"
|
||||||
|
import Footer from "../Footer"
|
||||||
import Sidebar from "../Sidebar"
|
import Sidebar from "../Sidebar"
|
||||||
import "./layout.scss"
|
import "./layout.scss"
|
||||||
import * as SC from "./styles"
|
import * as SC from "./styles"
|
||||||
@@ -37,13 +38,7 @@ const Layout = ({ children }: PropsWithChildren<{}>) => {
|
|||||||
</SC.MainContent>
|
</SC.MainContent>
|
||||||
</SC.Main>
|
</SC.Main>
|
||||||
</Container>
|
</Container>
|
||||||
<footer>
|
<Footer />
|
||||||
<Container>
|
|
||||||
© {new Date().getFullYear()}, Built with
|
|
||||||
{` `}
|
|
||||||
<a href="https://www.gatsbyjs.org">Gatsby</a>
|
|
||||||
</Container>
|
|
||||||
</footer>
|
|
||||||
</Scrollbar>
|
</Scrollbar>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user