diff --git a/src/components/Image.js b/src/components/Image.js
index 1fbc01f..d32b36c 100644
--- a/src/components/Image.js
+++ b/src/components/Image.js
@@ -1,8 +1,7 @@
-import * as React from "react"
-import {GatsbyImage, getImage} from "gatsby-plugin-image"
+import {getImage} from "gatsby-plugin-image"
import {useStaticQuery, graphql} from "gatsby"
-const Image = ({name}) => {
+const Image = (name) => {
const { images: { edges: images } } = useStaticQuery(graphql`
query {
images: allFile(filter: {relativeDirectory: {eq: "images"}}) {
@@ -21,9 +20,7 @@ query {
const propName = name
const imageData = images.find(({node: {name}}) => name === propName)
const image = getImage(imageData.node)
- return (
-
- )
+ return image
}
export default Image
diff --git a/src/pages/posts/init.js b/src/pages/posts/init.js
index 8b38359..cee1a87 100644
--- a/src/pages/posts/init.js
+++ b/src/pages/posts/init.js
@@ -2,6 +2,7 @@ import * as React from "react"
import * as styles from "../../styles/Post.module.css"
import * as homeStyles from "../../styles/Home.module.css"
import Header from "../../components/Header"
+import Footer from "../../components/Footer"
import {StaticImage} from "gatsby-plugin-image"
const InitPage = () => {
@@ -57,6 +58,8 @@ const InitPage = () => {
+
+
>
)
}
diff --git a/src/pages/posts/law.js b/src/pages/posts/law.js
index 65a6777..63c2562 100644
--- a/src/pages/posts/law.js
+++ b/src/pages/posts/law.js
@@ -1,7 +1,8 @@
import * as React from "react"
import Image from "../../components/Image"
import Header from "../../components/Header"
-import {StaticImage} from "gatsby-plugin-image"
+import Footer from "../../components/Footer"
+import {StaticImage, GatsbyImage} from "gatsby-plugin-image"
import * as styles from "../../styles/Post.module.css"
import * as homeStyles from "../../styles/Home.module.css"
import {Link} from "gatsby"
@@ -37,7 +38,7 @@ const LawPage = () => {
{element.title}
{element.titleEn}
-
+
})
}
@@ -45,6 +46,7 @@ const LawPage = () => {
+
>
)
}
diff --git a/src/pages/posts/map.js b/src/pages/posts/map.js
index a0ed302..19df676 100644
--- a/src/pages/posts/map.js
+++ b/src/pages/posts/map.js
@@ -2,6 +2,7 @@ import * as React from "react"
import * as styles from "../../styles/Post.module.css"
import * as homeStyles from "../../styles/Home.module.css"
import Header from "../../components/Header"
+import Footer from "../../components/Footer"
import {StaticImage} from "gatsby-plugin-image"
import Copyright from "../../components/Copyright"
import DownloadReport from "../../components/DownloadReport"
@@ -200,6 +201,8 @@ const MapPage = () => {
+
+
>
)
}
diff --git a/src/templates/law.js b/src/templates/law.js
index 99b8ea7..4b551b4 100644
--- a/src/templates/law.js
+++ b/src/templates/law.js
@@ -1,6 +1,9 @@
import * as React from "react"
import Header from "../components/Header"
-import {StaticImage} from "gatsby-plugin-image"
+import Footer from "../components/Footer"
+import Image from "../components/Image"
+import {GatsbyImage} from "gatsby-plugin-image"
+import {Link} from "gatsby"
import * as style from "../styles/Post.module.css"
import * as homeStyle from "../styles/Home.module.css"
@@ -10,21 +13,22 @@ const LawPage = (props) => {
return (
<>
} />
+ {"<<"}返回目录
{element.title}
{element.titleEn}
- 发布于 {element.date}
+ {element.date}
{element.videos.map((video) => {
const poster = video.substr(0, video.indexOf('.mp4')) + '_poster.jpg';
@@ -36,6 +40,7 @@ const LawPage = (props) => {
+
>
)
}