diff options
author | 2024-03-13 17:35:33 +0800 | |
---|---|---|
committer | 2024-03-13 17:35:33 +0800 | |
commit | 8dceb5eb36226f1d097d02c47e1b24231dc333d1 (patch) | |
tree | 22662b9b3bbb9555d7152b4239fac00d55b9d1b0 /examples/framework-multiple/src/components/react/ReactCounter.tsx | |
parent | f456fed23cfffd5b7d09d1b541f858a90f5ea20f (diff) | |
download | astro-8dceb5eb36226f1d097d02c47e1b24231dc333d1.tar.gz astro-8dceb5eb36226f1d097d02c47e1b24231dc333d1.tar.zst astro-8dceb5eb36226f1d097d02c47e1b24231dc333d1.zip |
Fix check example CI fail (#10415)
Diffstat (limited to 'examples/framework-multiple/src/components/react/ReactCounter.tsx')
-rw-r--r-- | examples/framework-multiple/src/components/react/ReactCounter.tsx | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/examples/framework-multiple/src/components/react/ReactCounter.tsx b/examples/framework-multiple/src/components/react/ReactCounter.tsx index 1cff97917..84681035d 100644 --- a/examples/framework-multiple/src/components/react/ReactCounter.tsx +++ b/examples/framework-multiple/src/components/react/ReactCounter.tsx @@ -1,7 +1,9 @@ -import { useState } from 'react'; +/** @jsxImportSource react */ + +import { useState, type ReactNode } from 'react'; /** A counter written with React */ -export function Counter({ children }) { +export function Counter({ children }: { children?: ReactNode }) { const [count, setCount] = useState(0); const add = () => setCount((i) => i + 1); const subtract = () => setCount((i) => i - 1); |