From 8798ec09d0febba6ab2d9ad3a17c962d563167c1 Mon Sep 17 00:00:00 2001 From: MehulZR Date: Wed, 15 Jan 2025 19:44:02 +0530 Subject: [PATCH] fix: routing form list overflow --- .../pages/forms/[...appPages].tsx | 296 +++++++++--------- 1 file changed, 147 insertions(+), 149 deletions(-) diff --git a/packages/app-store/routing-forms/pages/forms/[...appPages].tsx b/packages/app-store/routing-forms/pages/forms/[...appPages].tsx index 5f9098a1732baf..b70747ae9c8fc0 100644 --- a/packages/app-store/routing-forms/pages/forms/[...appPages].tsx +++ b/packages/app-store/routing-forms/pages/forms/[...appPages].tsx @@ -173,169 +173,167 @@ export default function RoutingForms({ }> -
-
-
- -
- } - /> - } - noResultsScreen={ - - } - SkeletonLoader={SkeletonLoaderTeamList}> -
- - {forms?.map(({ form, readOnly }, index) => { - if (!form) { - return null; - } +
+
+ +
+ } + /> + } + noResultsScreen={ + + } + SkeletonLoader={SkeletonLoaderTeamList}> +
+ + {forms?.map(({ form, readOnly }, index) => { + if (!form) { + return null; + } - const description = form.description || ""; - form.routes = form.routes || []; - const fields = form.fields || []; - const userRoutes = form.routes.filter((route) => !isFallbackRoute(route)); - const firstItem = forms[0].form; - const lastItem = forms[forms.length - 1].form; + const description = form.description || ""; + form.routes = form.routes || []; + const fields = form.fields || []; + const userRoutes = form.routes.filter((route) => !isFallbackRoute(route)); + const firstItem = forms[0].form; + const lastItem = forms[forms.length - 1].form; - return ( -
- {!(firstItem && firstItem.id === form.id) && ( - moveRoutingForm(index, -1)} arrowDirection="up" /> - )} + return ( +
+ {!(firstItem && firstItem.id === form.id) && ( + moveRoutingForm(index, -1)} arrowDirection="up" /> + )} - {!(lastItem && lastItem.id === form.id) && ( - moveRoutingForm(index, 1)} arrowDirection="down" /> - )} - - {form.team?.name && ( -
- - {form.team.name} - -
- )} - - - - - + {!(lastItem && lastItem.id === form.id) && ( + moveRoutingForm(index, 1)} arrowDirection="down" /> + )} + + {form.team?.name && ( +
+ + {form.team.name} + +
+ )} + + + + + + + - - - {t("edit")} - - - {t("download_responses")} - + color="minimal" + className="!flex" + StartIcon="pencil"> + {t("edit")} + + + {t("download_responses")} + + + {t("duplicate")} + + {typeformApp?.isInstalled ? ( - {t("duplicate")} - - {typeformApp?.isInstalled ? ( - - {t("Copy Typeform Redirect Url")} - - ) : null} - - {t("delete")} + type="button" + StartIcon="link"> + {t("Copy Typeform Redirect Url")} - - - - }> -
- - {fields.length} {fields.length === 1 ? "field" : "fields"} - - - {userRoutes.length} {userRoutes.length === 1 ? "route" : "routes"} - - - {form._count.responses}{" "} - {form._count.responses === 1 ? "response" : "responses"} - -
-
-
- ); - })} - -
- -
+ ) : null} + + {t("delete")} + + + + + }> +
+ + {fields.length} {fields.length === 1 ? "field" : "fields"} + + + {userRoutes.length} {userRoutes.length === 1 ? "route" : "routes"} + + + {form._count.responses}{" "} + {form._count.responses === 1 ? "response" : "responses"} + +
+ +
+ ); + })} +
+
+