Skip to content

Commit

Permalink
Fix(assets): Fixed the props definition to use PageProps
Browse files Browse the repository at this point in the history
  • Loading branch information
M-Ivan committed Jul 9, 2022
1 parent 06bfd9c commit 2cd06cd
Showing 1 changed file with 4 additions and 30 deletions.
34 changes: 4 additions & 30 deletions src/pages/assets.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { useIntl } from "gatsby-plugin-intl"
import { ThemeContext } from "styled-components"
import styled from "styled-components"
import { GatsbyImage, getImage } from "gatsby-plugin-image"
import { graphql } from "gatsby"
import { graphql, PageProps } from "gatsby"

import AssetDownload from "../components/AssetDownload"
import Link from "../components/Link"
Expand All @@ -14,6 +14,7 @@ import FeedbackCard from "../components/FeedbackCard"

import { translateMessageId } from "../utils/translations"
import EthGlyphColoredSvg from "../assets/assets/eth-glyph-colored.svg"
import { Context } from "../types"

const Image = styled(GatsbyImage)`
align-self: center;
Expand Down Expand Up @@ -75,34 +76,7 @@ const Header = styled.header`
}
`

export interface IGatsbyChildImageSharp {
gatsbyImageData: {
height: number
width: number
images: {
fallback: {
src: string
srcSet: string
sizes: string
}
sources: {
srcSet: string
sizes: string
type: string
}[]
}
layout: string
placeholder: {
fallback: string
}
}
}

export interface IProps {
data: Record<string, IGatsbyChildImageSharp>
}

const AssetsPage: React.FC<IProps> = ({ data }) => {
const AssetsPage = ({ data }: PageProps<Queries.AssetsPageQuery, Context>) => {
const intl = useIntl()
const themeContext = useContext(ThemeContext)
const isDarkTheme = themeContext.isDark
Expand Down Expand Up @@ -536,7 +510,7 @@ export const assetItem = graphql`
`

export const query = graphql`
{
query AssetsPage {
ethDiamondBlackHero: file(
relativePath: { eq: "assets/eth-diamond-black.png" }
) {
Expand Down

0 comments on commit 2cd06cd

Please sign in to comment.