You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
🧪 feat: add action to change the current project
Implements a new action to allow users to change their current project.
- Adds a new file `apps/web/actions/changeProject.ts` for handling project change requests.
- Defines a schema for validating project change requests using Zod.
- Checks if the user is logged in and has access to the target project before updating their current project.
- Triggers revalidation of the `/app` path after a successful project change.
- Exports the `changeProject` function from `apps/web/actions/index.ts`.
- Removes the `changeProject` function from the `Dashboard` component and uses the imported action instead.
- Adds a utility function `parseZodError` to convert Zod errors into user-friendly messages.
0 commit comments