Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: renamed hello state to name in hero section demo #611

Open
wants to merge 1 commit into
base: next
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions packages/docs/src/app/(pages)/_landing/demo.client.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import { parseAsInteger, useQueryState } from 'nuqs'

export function Demo() {
const [hello, setHello] = useQueryState('hello', { defaultValue: '' })
const [name, setName] = useQueryState('name', { defaultValue: '' })
const [count, setCount] = useQueryState(
'count',
parseAsInteger.withDefault(0)
Expand All @@ -18,13 +18,13 @@ export function Demo() {
Count: {count}
</button>
<input
value={hello}
value={name}
placeholder="Enter your name"
className="peer flex h-10 rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50"
onChange={e => setHello(e.target.value || null)}
data-interacted={Boolean(hello)}
onChange={e => setName(e.target.value || null)}
data-interacted={Boolean(name)}
/>
<p>Hello, {hello || 'anonymous visitor'}!</p>
<p>Hello, {name || 'anonymous visitor'}!</p>
</>
)
}