Skip to content
This repository was archived by the owner on Mar 26, 2026. It is now read-only.

Commit 1d0ae54

Browse files
vitbokischclaude
andcommitted
Fix template for @pyreon/store 0.10.0 + form register types
- Store: useAppStore() returns { store }, destructure from store - Form: register() returns Signal<unknown> — use as any until @pyreon/feature preserves schema generics through register() Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 411372c commit 1d0ae54

2 files changed

Lines changed: 5 additions & 4 deletions

File tree

packages/create-zero/templates/default/src/routes/_layout.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@ const queryClient = new QueryClient({
88
})
99

1010
export function layout(props: { children: any }) {
11-
const { sidebarOpen, toggleSidebar } = useAppStore()
11+
const { store } = useAppStore()
12+
const { sidebarOpen, toggleSidebar } = store
1213

1314
return (
1415
<QueryClientProvider client={queryClient}>

packages/create-zero/templates/default/src/routes/posts/new.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,17 +33,17 @@ export default function NewPostPage() {
3333
<form onSubmit={(e: Event) => form.handleSubmit(e)}>
3434
<div class="form-field">
3535
<label for="title">Title</label>
36-
<input id="title" {...form.register('title')} />
36+
<input id="title" {...(form.register('title') as any)} />
3737
</div>
3838
<div class="form-field">
3939
<label for="body">Body</label>
40-
<textarea id="body" rows={6} {...form.register('body')} />
40+
<textarea id="body" rows={6} {...(form.register('body') as any)} />
4141
</div>
4242
<div class="form-field">
4343
<label class="checkbox-label">
4444
<input
4545
type="checkbox"
46-
{...form.register('published', { type: 'checkbox' })}
46+
{...(form.register('published', { type: 'checkbox' }) as any)}
4747
/>
4848
Published
4949
</label>

0 commit comments

Comments
 (0)