diff --git a/.env.example b/.env.example index 226554d67..455ce765c 100644 --- a/.env.example +++ b/.env.example @@ -8,6 +8,7 @@ export NEXT_PUBLIC_PEANUT_ACCESS_CODE="" export NEXT_PUBLIC_GA_KEY="" export NEXT_PUBLIC_WC_PROJECT_ID="" export NEXT_PUBLIC_SENTRY_DSN="" +export NEXT_PUBLIC_BASE_URL="https://peanut.to" export MOBULA_API_KEY="" export NEXT_PUBLIC_RECAPTCHA_SITE_KEY="" export DISCORD_WEBHOOK_URL="" diff --git a/src/app/claim/page.tsx b/src/app/claim/page.tsx index c802e0012..72f80524e 100644 --- a/src/app/claim/page.tsx +++ b/src/app/claim/page.tsx @@ -2,7 +2,6 @@ import { Claim } from '@/components' import Layout from '@/components/Global/Layout' import { Metadata } from 'next' -import { headers } from 'next/headers' import { getLinkDetails } from '@squirrel-labs/peanut-sdk' import * as utils from '@/utils' @@ -33,8 +32,7 @@ function createURL(host: string, searchParams: { [key: string]: string | string[ export async function generateMetadata({ searchParams }: Props): Promise { let title = 'Claim your tokens!' - let host = headers().get('host') || 'peanut.to' - host = `${process.env.NODE_ENV === 'development' ? 'http://' : 'https://'}${host}` + const host = process.env.NEXT_PUBLIC_BASE_URL! let linkDetails = undefined try { const url = createURL(host, searchParams) diff --git a/src/app/request/pay/page.tsx b/src/app/request/pay/page.tsx index 508861fd4..22674fb73 100644 --- a/src/app/request/pay/page.tsx +++ b/src/app/request/pay/page.tsx @@ -2,7 +2,6 @@ import { Metadata } from 'next' import { peanut } from '@squirrel-labs/peanut-sdk' import Layout from '@/components/Global/Layout' import { PayRequestLink } from '@/components' -import { headers } from 'next/headers' import { PreviewType } from '@/components/Global/ImageGeneration/LinkPreview' import { formatAmount, printableAddress } from '@/utils' @@ -34,8 +33,7 @@ export async function generateMetadata({ searchParams }: Props): Promise utils.areTokenAddressesEqual(token.address, tokenAddress))?.logoURI const chainImage = consts.supportedPeanutChains.find((chain) => chain.chainId === chainId)?.icon.url - let host = headers().get('host') || 'peanut.to' - host = `${process.env.NODE_ENV === 'development' ? 'http://' : 'https://'}${host}` - const previewBg = `${host}/preview-bg.png` + const previewBg = `${process.env.NEXT_PUBLIC_BASE_URL}/preview-bg.png` return (
setValue(e.target.value)} onKeyDown={(e) => { diff --git a/src/components/Global/ValidatedInput/index.tsx b/src/components/Global/ValidatedInput/index.tsx index 56b4b165a..4a2b1d826 100644 --- a/src/components/Global/ValidatedInput/index.tsx +++ b/src/components/Global/ValidatedInput/index.tsx @@ -103,7 +103,9 @@ const ValidatedInput = ({ dark:bg-n-1 dark:text-white dark:placeholder:text-white/75" placeholder={placeholder} spellCheck="false" - autoComplete={autoComplete || 'iban'} + autoComplete={autoComplete || 'off'} + autoCorrect="off" + autoCapitalize="off" name={name} list={suggestions ? listId.current : undefined} style={{