Optimized agents rules subfolders, dependencies updates (#355)
* Update AGENTS.md and CLAUDE.md for improved clarity and structure * Added MCP Server * Added missing triggers to tables that should have used them * Updated all dependencies * Fixed rare bug in React present in the Admin layout which prevents navigating to pages (sometimes...)
This commit is contained in:
committed by
GitHub
parent
9fae142f2d
commit
533dfba5b9
@@ -3,6 +3,7 @@ description: Writing Forms with Shadcn UI, Server Actions, Zod
|
||||
globs: apps/**/*.tsx,packages/**/*.tsx
|
||||
alwaysApply: false
|
||||
---
|
||||
|
||||
# Forms
|
||||
|
||||
- Use React Hook Form for form validation and submission.
|
||||
@@ -10,6 +11,7 @@ alwaysApply: false
|
||||
- Use the `zodResolver` function to resolve the Zod schema to the form.
|
||||
- Use Server Actions [server-actions.mdc](mdc:.cursor/rules/server-actions.mdc) for server-side code handling
|
||||
- Use Sonner for writing toasters for UI feedback
|
||||
- Never add generics to `useForm`, use Zod resolver to infer types instead
|
||||
|
||||
Follow the example below to create all forms:
|
||||
|
||||
@@ -35,7 +37,9 @@ Server Actions [server-actions.mdc](mdc:.cursor/rules/server-actions.mdc) can he
|
||||
'use server';
|
||||
|
||||
import { z } from 'zod';
|
||||
|
||||
import { enhanceAction } from '@kit/next/actions';
|
||||
|
||||
import { CreateNoteSchema } from '../schema/create-note.schema';
|
||||
|
||||
export const createNoteAction = enhanceAction(
|
||||
@@ -144,4 +148,4 @@ export function CreateNoteForm() {
|
||||
}
|
||||
```
|
||||
|
||||
Always use `@kit/ui` for writing the UI of the form.
|
||||
Always use `@kit/ui` for writing the UI of the form.
|
||||
|
||||
Reference in New Issue
Block a user