Ready for 1.1.3-rc.2 and migrating on nextjs 16

This commit is contained in:
charlesgauthereau
2025-11-03 12:32:00 +01:00
parent c62be9854a
commit 529f157c6e
16 changed files with 540 additions and 210 deletions
@@ -30,8 +30,8 @@ export const RegisterForm = (props: registerFormProps) => {
await signUp.email(values, {
onSuccess: () => {
toast.success(`Success`);
router.push(`/login`);
router.refresh();
router.push(`/login`);
},
onError: (error) => {
console.log(error);
@@ -52,11 +52,14 @@ export const AgentForm = (props: agentFormProps) => {
return;
}
toast.success(`Success ${isCreate ? "creating" : "updating"} agent`);
router.push(`/dashboard/agents/${data.id}`);
router.refresh();
router.push(`/dashboard/agents/${data.id}`);
},
});
return (
<TooltipProvider>
<Card>
@@ -23,10 +23,10 @@ export const DeleteOrganizationButton = (props: DeleteOrganizationButtonProps) =
await authClient.organization.setActive({
organizationSlug: "default",
});
router.push("/");
toast.success(result.data.actionSuccess?.message || "Organization deleted.");
router.refresh()
refetch()
router.push("/");
} else {
// @ts-ignore
const errorMsg = result?.data?.actionError?.message || result?.data?.actionError?.messageParams?.message || "Failed to delete the organization.";
@@ -54,8 +54,8 @@ export const UserForm = (props: UserFormProps) => {
}
toast.success(`Profile updated successfully.`);
router.push(`/dashboard/profile`);
router.refresh();
router.push(`/dashboard/profile`);
},
});
@@ -64,8 +64,8 @@ export const ProjectForm = (props: projectFormProps) => {
if (project && project.data) {
if (project.data.success) {
project.data.actionSuccess && toast.success(project.data.actionSuccess.message);
router.push(`/dashboard/projects/${project.data.value!.id}`);
router.refresh();
router.push(`/dashboard/projects/${project.data.value!.id}`);
} else {
project.data.actionError && toast.error(project.data.actionError.message || "Unknown error occurred.");
router.refresh();