fix: shortcut search (#283)

* fix: search case innsensitive

* style: email icon updated
This commit is contained in:
Anmol Singh Bhatia 2023-02-15 12:28:22 +05:30 committed by GitHub
parent ab0ce2f649
commit 9b51a918cf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 5 deletions

View File

@ -45,9 +45,10 @@ const allShortcuts = shortcuts.map((i) => i.shortcuts).flat(1);
export const ShortcutsModal: React.FC<Props> = ({ 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(() => {

View File

@ -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,
},
];