mirror of
https://github.com/Stone-Red-Code/website.git
synced 2026-09-04 09:15:58 +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 DocsSidebar from "../DocsSidebar"
|
||||
import Footer from "../Footer"
|
||||
import * as SC from "./styles"
|
||||
|
||||
const DocsLayout = ({ children }: PropsWithChildren<{}>) => {
|
||||
@@ -31,11 +32,7 @@ const DocsLayout = ({ children }: PropsWithChildren<{}>) => {
|
||||
{children}
|
||||
</SC.MainContent>
|
||||
</SC.Main>
|
||||
<footer>
|
||||
© {new Date().getFullYear()}, Built with
|
||||
{` `}
|
||||
<a href="https://www.gatsbyjs.org">Gatsby</a>
|
||||
</footer>
|
||||
<Footer />
|
||||
</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 Container from "../Container"
|
||||
import Footer from "../Footer"
|
||||
import Sidebar from "../Sidebar"
|
||||
import "./layout.scss"
|
||||
import * as SC from "./styles"
|
||||
@@ -37,13 +38,7 @@ const Layout = ({ children }: PropsWithChildren<{}>) => {
|
||||
</SC.MainContent>
|
||||
</SC.Main>
|
||||
</Container>
|
||||
<footer>
|
||||
<Container>
|
||||
© {new Date().getFullYear()}, Built with
|
||||
{` `}
|
||||
<a href="https://www.gatsbyjs.org">Gatsby</a>
|
||||
</Container>
|
||||
</footer>
|
||||
<Footer />
|
||||
</Scrollbar>
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user