From 2e42748deabb702e709f783cc7be4b927c935a00 Mon Sep 17 00:00:00 2001 From: zramsay Date: Mon, 5 May 2025 17:52:02 -0400 Subject: [PATCH] fix --- README.md | 1 + src/components/URLForm.tsx | 6 ++++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index ca9988a..30e8195 100644 --- a/README.md +++ b/README.md @@ -33,6 +33,7 @@ Client-side (must be prefixed with NEXT_PUBLIC_): - `NEXT_PUBLIC_COSMOS_RPC_URL` - The RPC URL for the Cosmos blockchain - `NEXT_PUBLIC_COSMOS_CHAIN_ID` - The chain ID for Keplr wallet (e.g., cosmoshub-4) - `NEXT_PUBLIC_DOMAIN_SUFFIX` - Optional suffix to append to DNS names in the UI (e.g. ".example.com") +- `NEXT_PUBLIC_EXAMPLE_URL` - Example URL to pre-fill in the URL form (e.g. "https://github.com/cerc-io/laconic-registry-cli") Server-side: - `REGISTRY_CHAIN_ID` - The chain ID for the Laconic Registry diff --git a/src/components/URLForm.tsx b/src/components/URLForm.tsx index a641897..b5065a3 100644 --- a/src/components/URLForm.tsx +++ b/src/components/URLForm.tsx @@ -8,7 +8,9 @@ interface URLFormProps { } export default function URLForm({ onSubmit, disabled }: URLFormProps) { - const [url, setUrl] = useState(''); + // Get example URL from environment variables or use a default + const exampleUrl = process.env.NEXT_PUBLIC_EXAMPLE_URL || 'https://example.com'; + const [url, setUrl] = useState(exampleUrl); const [error, setError] = useState(''); const handleSubmit = (e: React.FormEvent) => { @@ -64,7 +66,7 @@ export default function URLForm({ onSubmit, disabled }: URLFormProps) { type="text" value={url} onChange={(e) => setUrl(e.target.value)} - placeholder="https://example.com" + placeholder={exampleUrl} className="w-full p-3 rounded-md transition-colors" style={{ background: 'var(--card-bg)',