diff --git a/website/src/components/Bot.tsx b/website/src/components/Bot.tsx index 86bbb625..c7f3dfdf 100644 --- a/website/src/components/Bot.tsx +++ b/website/src/components/Bot.tsx @@ -13,7 +13,7 @@ import ModalTitle from "./ModalTitle"; import Paginate from "./Paginate"; import TagComponent from "./Tag"; -export default function Adapter(): JSX.Element { +export default function Bot(): JSX.Element { const [modalOpen, setModalOpen] = useState(false); const { filter, diff --git a/website/src/components/Plugin.tsx b/website/src/components/Plugin.tsx index 7f3ddacf..3723eef9 100644 --- a/website/src/components/Plugin.tsx +++ b/website/src/components/Plugin.tsx @@ -13,7 +13,7 @@ import ModalTitle from "./ModalTitle"; import Paginate from "./Paginate"; import TagComponent from "./Tag"; -export default function Adapter(): JSX.Element { +export default function Plugin(): JSX.Element { const [modalOpen, setModalOpen] = useState(false); const { filter, diff --git a/website/src/libs/store.ts b/website/src/libs/store.ts index db0dc27f..bd8952e5 100644 --- a/website/src/libs/store.ts +++ b/website/src/libs/store.ts @@ -19,12 +19,12 @@ export type Obj = { export function filterObjs(filter: string, objs: Obj[]): Obj[] { return objs.filter((o) => { return ( - o.module_name?.indexOf(filter) != -1 || - o.project_link?.indexOf(filter) != -1 || - o.name.indexOf(filter) != -1 || - o.desc.indexOf(filter) != -1 || - o.author.indexOf(filter) != -1 || - o.tags.filter((t) => t.label.indexOf(filter) != -1).length > 0 + o.module_name?.includes(filter) || + o.project_link?.includes(filter) || + o.name.includes(filter) || + o.desc.includes(filter) || + o.author.includes(filter) || + o.tags.filter((t) => t.label.includes(filter)).length > 0 ); }); }