-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path[locale].tsx
82 lines (75 loc) · 2.03 KB
/
[locale].tsx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
import * as React from "react"
import { PageProps } from "gatsby"
import Hero from "../components/hero"
import MyNFTs from "../components/my-nfts"
import Section from "../components/section"
import Layout from "../components/layout"
import Seo from "../components/seo"
import Markdown from "../components/markdown"
import type { DecoratedLocale } from "../../lib/locales"
import Reveal from "../components/reveal"
import { navigate } from "gatsby"
type PageContext = {
locale: DecoratedLocale
}
const Landing: React.FC<PageProps<{}, PageContext>> = ({ location, pageContext: { locale } }) => {
const params = new URLSearchParams(location.search)
const transactionHashes = params.get('transactionHashes')
if (transactionHashes) {
return <Reveal onClose={() => navigate(`/${locale.id}`)} />
}
return (
<Layout title={locale.title}>
<Seo lang={locale.id} title={locale.title} description={locale.description} />
<MyNFTs />
<Hero heroTree={locale.hero} />
{locale.extraSections?.map((section, i) => (
<Section key={i} {...section}>
<Markdown children={section.text} />
</Section>
))}
</Layout>
)
}
export default Landing
/*
export const pageQuery = graphql`
query OneVideo {
file(relativePath: { eq: "RevealBackground.mp4" }) {
childVideoFfmpeg {
webm: transcode(
outputOptions: ["-crf 20", "-b:v 0"]
maxWidth: 900
maxHeight: 480
fileExtension: "webm"
codec: "libvpx-vp9"
) {
width
src
presentationMaxWidth
presentationMaxHeight
originalName
height
fileExtension
aspectRatio
}
mp4: transcode(
maxWidth: 900
maxHeight: 480
fileExtension: "mp4"
codec: "libx264"
) {
width
src
presentationMaxWidth
presentationMaxHeight
originalName
height
fileExtension
aspectRatio
}
}
}
}
`
*/