فهرست منبع

fix(dashboard): Fix redirect after creating new product

Michael Bromley 6 ماه پیش
والد
کامیت
5ea9ad85de
1فایلهای تغییر یافته به همراه1 افزوده شده و 1 حذف شده
  1. 1 1
      packages/dashboard/src/app/routes/_authenticated/_products/products_.$id.tsx

+ 1 - 1
packages/dashboard/src/app/routes/_authenticated/_products/products_.$id.tsx

@@ -84,7 +84,7 @@ function ProductDetailPage() {
             toast.success(i18n.t('Successfully updated product'));
             toast.success(i18n.t('Successfully updated product'));
             resetForm();
             resetForm();
             if (creatingNewEntity) {
             if (creatingNewEntity) {
-                await navigate({ to: `../${data.id}`, from: Route.id });
+                await navigate({ to: `../$id`, params: { id: data.id } });
             }
             }
         },
         },
         onError: err => {
         onError: err => {