use FeedModel model

This commit is contained in:
SrGooglo 2023-02-24 14:35:12 +00:00
parent 59f901334b
commit 871ad08925

View File

@ -5,6 +5,8 @@ import classnames from "classnames"
import { UserPreview } from "components" import { UserPreview } from "components"
import { Icons, createIconRender } from "components/Icons" import { Icons, createIconRender } from "components/Icons"
import FeedModel from "models/feed"
import "./index.less" import "./index.less"
const ResultRenders = { const ResultRenders = {
@ -88,7 +90,7 @@ export default (props) => {
return setSearchResult(null) return setSearchResult(null)
} }
const result = await app.searchEngine.search(value) const result = await FeedModel.search(value)
return setSearchResult(result) return setSearchResult(result)
} }
@ -105,11 +107,11 @@ export default (props) => {
const handleResultClick = (type, value) => { const handleResultClick = (type, value) => {
switch (type) { switch (type) {
case "users": { case "users": {
app.goToAccount(value.username) app.navigation.goToAccount(value.username)
break break
} }
case "posts": { case "posts": {
app.goToPost(value) app.navigation.goToPost(value)
break break
} }