1
- import { GetStaticProps } from "next"
1
+ "use client"
2
+
2
3
import dynamic from "next/dynamic"
3
4
import { useLocale } from "next-intl"
4
5
import { QueryClient , QueryClientProvider } from "@tanstack/react-query"
5
6
6
- import { BasePageProps , Lang , Wallet } from "@/lib/types"
7
+ import { Wallet } from "@/lib/types"
7
8
8
9
import { Image } from "@/components/Image"
9
10
import MainArticle from "@/components/MainArticle"
10
- import PageMetadata from "@/components/PageMetadata"
11
11
import StartWithEthereumFlow from "@/components/StartWithEthereumFlow"
12
12
import ShareModal from "@/components/StartWithEthereumFlow/ShareModal"
13
13
14
- import { existsNamespace } from "@/lib/utils/existsNamespace"
15
- import { getLastDeployDate } from "@/lib/utils/getLastDeployDate"
16
- import { getLocaleTimestamp } from "@/lib/utils/time"
17
- import { getRequiredNamespacesForPage } from "@/lib/utils/translations"
18
- import { getNewToCryptoWallets } from "@/lib/utils/wallets"
19
-
20
- import { DEFAULT_LOCALE , LOCALES_CODES } from "@/lib/constants"
21
-
22
- import loadNamespaces from "@/i18n/loadNamespaces"
23
14
import HeroImage from "@/public/images/heroes/developers-hub-hero.jpg"
24
15
import ManDogeImage from "@/public/images/start-with-ethereum/man-doge-playing.png"
25
16
@@ -30,43 +21,6 @@ const WalletProviders = dynamic(() => import("@/components/WalletProviders"), {
30
21
31
22
const queryClient = new QueryClient ( )
32
23
33
- export async function getStaticPaths ( ) {
34
- return {
35
- paths : LOCALES_CODES . map ( ( locale ) => ( { params : { locale } } ) ) ,
36
- fallback : false ,
37
- }
38
- }
39
-
40
- export const getStaticProps = ( async ( { params } ) => {
41
- const { locale = DEFAULT_LOCALE } = params || { }
42
-
43
- const lastDeployDate = getLastDeployDate ( )
44
- const lastDeployLocaleTimestamp = getLocaleTimestamp (
45
- locale as Lang ,
46
- lastDeployDate
47
- )
48
-
49
- const requiredNamespaces = getRequiredNamespacesForPage ( "/start" )
50
-
51
- const contentNotTranslated = ! existsNamespace (
52
- locale ! as string ,
53
- requiredNamespaces [ 2 ]
54
- )
55
-
56
- const messages = await loadNamespaces ( locale as string , requiredNamespaces )
57
-
58
- const newToCryptoWallets = getNewToCryptoWallets ( )
59
-
60
- return {
61
- props : {
62
- messages,
63
- contentNotTranslated,
64
- lastDeployLocaleTimestamp,
65
- newToCryptoWallets,
66
- } ,
67
- }
68
- } ) satisfies GetStaticProps < BasePageProps >
69
-
70
24
const StartWithCryptoPage = ( {
71
25
newToCryptoWallets,
72
26
} : {
@@ -78,12 +32,6 @@ const StartWithCryptoPage = ({
78
32
< QueryClientProvider client = { queryClient } >
79
33
< WalletProviders locale = { locale } >
80
34
< MainArticle className = "flex w-full flex-col items-center overflow-x-hidden" >
81
- < PageMetadata
82
- title = { "Start with crypto" }
83
- description = { "Your gateway to the world of ethereum" }
84
- image = { HeroImage . src }
85
- />
86
-
87
35
< div className = "mb-16 h-[240px] w-full md:h-[380px] lg:h-[398px]" >
88
36
< Image
89
37
src = { HeroImage }
0 commit comments