refactor: migrate to vite and restructure repo

Co-authored-by: Ona <no-reply@ona.com>
This commit is contained in:
2025-10-18 14:02:20 +00:00
parent 83a5f92506
commit 25796ab609
94 changed files with 478 additions and 312 deletions

View File

@@ -0,0 +1,15 @@
import { type PrimitiveAtom, useAtom } from "jotai"
export function WithAtom<Value>({
atom,
children,
}: {
atom: PrimitiveAtom<Value>
children: (
value: Value,
setValue: (value: Value | ((current: Value) => Value)) => void,
) => React.ReactNode
}) {
const [value, setValue] = useAtom(atom)
return children(value, setValue)
}