mirror of
https://github.com/nonebot/nonebot2.git
synced 2024-11-28 03:15:24 +08:00
🐛 Fix: 商店搜索失效 (#978)
This commit is contained in:
parent
90f7c153cb
commit
e8b9963ef3
@ -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<boolean>(false);
|
||||
const {
|
||||
filter,
|
||||
|
@ -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<boolean>(false);
|
||||
const {
|
||||
filter,
|
||||
|
@ -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
|
||||
);
|
||||
});
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user