From ccbcfecc6d586d174e741d47920682e99cdbea90 Mon Sep 17 00:00:00 2001 From: Aaryan Khandelwal <65252264+aaryan610@users.noreply.github.com> Date: Sun, 23 Jul 2023 22:13:09 +0530 Subject: [PATCH] fix: form not submitting on enter (#1613) --- .../app/components/core/modals/link-modal.tsx | 2 +- .../components/core/sidebar/links-list.tsx | 60 +++++++++---------- 2 files changed, 30 insertions(+), 32 deletions(-) diff --git a/apps/app/components/core/modals/link-modal.tsx b/apps/app/components/core/modals/link-modal.tsx index b8d512a85..63a821dce 100644 --- a/apps/app/components/core/modals/link-modal.tsx +++ b/apps/app/components/core/modals/link-modal.tsx @@ -116,7 +116,7 @@ export const LinkModal: React.FC = ({ isOpen, handleClose, onFormSubmit }
Cancel - + {isSubmitting ? "Adding Link..." : "Add Link"}
diff --git a/apps/app/components/core/sidebar/links-list.tsx b/apps/app/components/core/sidebar/links-list.tsx index a0619b924..0d8a97298 100644 --- a/apps/app/components/core/sidebar/links-list.tsx +++ b/apps/app/components/core/sidebar/links-list.tsx @@ -1,5 +1,3 @@ -import Link from "next/link"; - // icons import { ArrowTopRightOnSquareIcon, LinkIcon, TrashIcon } from "@heroicons/react/24/outline"; // helpers @@ -30,14 +28,14 @@ export const LinksList: React.FC = ({ links, handleDeleteLink, userAuth }
{!isNotAllowed && (
- - - - - + + +
)} - - -
- -
-
-
{link.title}
-

- Added {timeAgo(link.created_at)} -
- by{" "} - {link.created_by_detail.is_bot - ? link.created_by_detail.first_name + " Bot" - : link.created_by_detail.email} -

-
-
- + +
+ +
+
+
{link.title}
+

+ Added {timeAgo(link.created_at)} +
+ by{" "} + {link.created_by_detail.is_bot + ? link.created_by_detail.first_name + " Bot" + : link.created_by_detail.email} +

+
+
))}