Skip to content

Commit

Permalink
fix: search recommended model
Browse files Browse the repository at this point in the history
  • Loading branch information
urmauur committed Dec 19, 2023
1 parent c1fef08 commit e71070a
Showing 1 changed file with 2 additions and 11 deletions.
13 changes: 2 additions & 11 deletions web/screens/ExploreModels/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,6 @@ import { useState } from 'react'
import {
Input,
ScrollArea,
Tooltip,
TooltipContent,
TooltipTrigger,
TooltipArrow,
Select,
SelectTrigger,
SelectValue,
Expand All @@ -17,10 +13,6 @@ import {

import { SearchIcon } from 'lucide-react'

import { Code2Icon, UserIcon } from 'lucide-react'

import { twMerge } from 'tailwind-merge'

import Loader from '@/containers/Loader'

import { useGetConfiguredModels } from '@/hooks/useGetConfiguredModels'
Expand All @@ -32,7 +24,6 @@ import ExploreModelList from './ExploreModelList'
const ExploreModelsScreen = () => {
const { loading, models } = useGetConfiguredModels()
const [searchValue, setsearchValue] = useState('')
const [tabActive, setTabActive] = useState('Model')
const { downloadedModels } = useGetDownloadedModels()
const [sortSelected, setSortSelected] = useState('All Models')
const sortMenu = ['All Models', 'Recommended', 'Downloaded']
Expand All @@ -45,8 +36,8 @@ const ExploreModelsScreen = () => {
)
} else if (sortSelected === 'Recommended') {
return (
x.metadata.tags.includes('Featured') ||
x.metadata.tags.includes('Recommended')
x.name.toLowerCase().includes(searchValue.toLowerCase()) &&
x.metadata.tags.includes('Featured')
)
} else {
return x.name.toLowerCase().includes(searchValue.toLowerCase())
Expand Down

0 comments on commit e71070a

Please sign in to comment.