add footer
This commit is contained in:
25
src/components/Footer.js
Normal file
25
src/components/Footer.js
Normal file
@@ -0,0 +1,25 @@
|
|||||||
|
import * as React from "react"
|
||||||
|
import * as styles from "../styles/Footer.module.css"
|
||||||
|
import {useStaticQuery, graphql} from "gatsby"
|
||||||
|
|
||||||
|
const Footer = () => {
|
||||||
|
const data = useStaticQuery(graphql`
|
||||||
|
query {
|
||||||
|
siteBuildMetadata {
|
||||||
|
buildTime(formatString: "YYYY MMMM DD")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
`)
|
||||||
|
console.log('data', data)
|
||||||
|
const {buildTime} = data.siteBuildMetadata
|
||||||
|
return (
|
||||||
|
<footer className={styles.footer}>
|
||||||
|
<small>
|
||||||
|
Website built with Gatsby.js at {buildTime}. ©2022-2023 Social OjO. All Rights Reserved.
|
||||||
|
</small>
|
||||||
|
</footer>
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
export default Footer
|
||||||
@@ -3,6 +3,7 @@ import * as styles from "../styles/Home.module.css"
|
|||||||
import {StaticImage} from "gatsby-plugin-image"
|
import {StaticImage} from "gatsby-plugin-image"
|
||||||
import Header from "../components/Header"
|
import Header from "../components/Header"
|
||||||
import PostPreview from "../components/PostPreview"
|
import PostPreview from "../components/PostPreview"
|
||||||
|
import Footer from "../components/Footer"
|
||||||
|
|
||||||
const IndexPage = () => {
|
const IndexPage = () => {
|
||||||
return (
|
return (
|
||||||
@@ -47,6 +48,8 @@ const IndexPage = () => {
|
|||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
</main>
|
</main>
|
||||||
|
|
||||||
|
<Footer />
|
||||||
</>
|
</>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user