Skip to content

Commit ba555b5

Browse files
committed
chore: Remove unused internals test
We're no longer using internals in the v2 branch.
1 parent 82ce2ca commit ba555b5

File tree

3 files changed

+14
-34
lines changed

3 files changed

+14
-34
lines changed

packages/docs/src/app/(pages)/_landing/demo.client.tsx

+14-5
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,22 @@
11
'use client'
22

3-
import { parseAsInteger, useQueryState } from 'nuqs'
3+
import { useQueryState } from 'nuqs'
4+
import { z } from 'zod'
45

56
export function Demo() {
67
const [hello, setHello] = useQueryState('hello', { defaultValue: '' })
7-
const [count, setCount] = useQueryState(
8-
'count',
9-
parseAsInteger.withDefault(0)
10-
)
8+
const [count, setCount] = useQueryState('count', {
9+
parse: z.coerce
10+
.number()
11+
.int()
12+
.default(0)
13+
.catch(({ input = 0 }) => {
14+
if (typeof input !== 'number') return 0 // Somehow it can be a string
15+
if (Number.isNaN(input)) return 0
16+
return Math.floor(input)
17+
}).parse,
18+
defaultValue: 0
19+
})
1120
return (
1221
<>
1322
<button

packages/e2e/cypress/e2e/internals.cy.js

-9
This file was deleted.

packages/e2e/src/app/app/internals/page.tsx

-20
This file was deleted.

0 commit comments

Comments
 (0)