From 9b51a918cfd394c1c78cc43e7b9d0725b3ce2b4b Mon Sep 17 00:00:00 2001 From: Anmol Singh Bhatia <121005188+anmolsinghbhatia@users.noreply.github.com> Date: Wed, 15 Feb 2023 12:28:22 +0530 Subject: [PATCH] fix: shortcut search (#283) * fix: search case innsensitive * style: email icon updated --- apps/app/components/command-palette/shortcuts-modal.tsx | 5 +++-- apps/app/components/workspace/help-section.tsx | 5 ++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/apps/app/components/command-palette/shortcuts-modal.tsx b/apps/app/components/command-palette/shortcuts-modal.tsx index 593c68324..42e5770b9 100644 --- a/apps/app/components/command-palette/shortcuts-modal.tsx +++ b/apps/app/components/command-palette/shortcuts-modal.tsx @@ -45,9 +45,10 @@ const allShortcuts = shortcuts.map((i) => i.shortcuts).flat(1); export const ShortcutsModal: React.FC = ({ isOpen, setIsOpen }) => { const [query, setQuery] = useState(""); - const filteredShortcuts = allShortcuts.filter((shortcut) => - shortcut.description.includes(query.trim()) || query === "" ? true : false + shortcut.description.toLowerCase().includes(query.trim().toLowerCase()) || query === "" + ? true + : false ); useEffect(() => { diff --git a/apps/app/components/workspace/help-section.tsx b/apps/app/components/workspace/help-section.tsx index b8ac07e24..3b540e190 100644 --- a/apps/app/components/workspace/help-section.tsx +++ b/apps/app/components/workspace/help-section.tsx @@ -2,14 +2,13 @@ import { useState, useRef, FC } from "react"; import { Transition } from "@headlessui/react"; import Link from "next/link"; // icons -import { ArrowLongLeftIcon } from "@heroicons/react/24/outline"; +import { ArrowLongLeftIcon, InboxIcon } from "@heroicons/react/24/outline"; import { QuestionMarkCircleIcon, BoltIcon, DocumentIcon, DiscordIcon, GithubIcon, - CommentIcon, } from "components/icons"; // hooks import useTheme from "hooks/use-theme"; @@ -34,7 +33,7 @@ const helpOptions = [ { name: "Email us", href: "mailto:hello@plane.so", - Icon: CommentIcon, + Icon: InboxIcon, }, ];