1- import { GetStaticProps } from "next"
1+ "use client"
2+
23import dynamic from "next/dynamic"
34import { useLocale } from "next-intl"
45import { QueryClient , QueryClientProvider } from "@tanstack/react-query"
56
6- import { BasePageProps , Lang , Wallet } from "@/lib/types"
7+ import { Wallet } from "@/lib/types"
78
89import { Image } from "@/components/Image"
910import MainArticle from "@/components/MainArticle"
10- import PageMetadata from "@/components/PageMetadata"
1111import StartWithEthereumFlow from "@/components/StartWithEthereumFlow"
1212import ShareModal from "@/components/StartWithEthereumFlow/ShareModal"
1313
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"
2314import HeroImage from "@/public/images/heroes/developers-hub-hero.jpg"
2415import ManDogeImage from "@/public/images/start-with-ethereum/man-doge-playing.png"
2516
@@ -30,43 +21,6 @@ const WalletProviders = dynamic(() => import("@/components/WalletProviders"), {
3021
3122const queryClient = new QueryClient ( )
3223
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-
7024const StartWithCryptoPage = ( {
7125 newToCryptoWallets,
7226} : {
@@ -78,12 +32,6 @@ const StartWithCryptoPage = ({
7832 < QueryClientProvider client = { queryClient } >
7933 < WalletProviders locale = { locale } >
8034 < 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-
8735 < div className = "mb-16 h-[240px] w-full md:h-[380px] lg:h-[398px]" >
8836 < Image
8937 src = { HeroImage }
0 commit comments