import React from "react"
import { FormattedMessage, injectIntl, navigate } from "gatsby-plugin-intl"

import Layout from "../components/layout"
import SEO from "../components/seo"

const SecondPage = ({ intl }) => (
  <Layout>
    <SEO
      lang={intl.locale}
      title={intl.formatMessage({ id: "legislation.state.common.title" })}
    />
    <h1>
      <FormattedMessage id="legislation.state.vic.name" />
    </h1>
    <p>
      <FormattedMessage id="legislation.state.common.primary" />
    </p>
    <a
      href="#"
      onClick={e => {
        e.preventDefault()
        navigate("/")
      }}
    >
      {intl.formatMessage({ id: "site.nav.back" })}
    </a>
  </Layout>
)

export default injectIntl(SecondPage)
