From 16e4c6bfb123208cca0a91f17316be5d5100edc2 Mon Sep 17 00:00:00 2001 From: AmbrishRamachandiran Date: Fri, 4 Aug 2023 09:57:31 +0530 Subject: [PATCH] Limit the use of the same shortcut name and url when adding a shortcut fixed review changes Signed-off-by: AmbrishRamachandiran --- plugins/shortcuts/src/ShortcutForm.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/shortcuts/src/ShortcutForm.tsx b/plugins/shortcuts/src/ShortcutForm.tsx index 6085c6c182..e8cd8144d0 100644 --- a/plugins/shortcuts/src/ShortcutForm.tsx +++ b/plugins/shortcuts/src/ShortcutForm.tsx @@ -71,13 +71,13 @@ export const ShortcutForm = ({ }, }); - const titleIsUnique = (title: string) => { + const titleIsUnique = (title: string) => { if (shortcutData.some(shortcutTitle => shortcutTitle.title === title)) return 'A shortcut with this title already exists'; return true; }; - const urlIsUnique = (url: string) => { + const urlIsUnique = (url: string) => { if (shortcutData.some(shortcutUrl => shortcutUrl.url === url)) return 'A shortcut with this url already exists'; return true;