forked from github/plane
fix: shortcut search (#283)
* fix: search case innsensitive * style: email icon updated
This commit is contained in:
parent
ab0ce2f649
commit
9b51a918cf
@ -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(() => {
|
||||
|
@ -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,
|
||||
},
|
||||
];
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user