* feat: model hub revamp UI * chore: model description - consistent markdown css * chore: add model versions dropdown * chore: integrate APIs - model sources * chore: update model display name * chore: lint fix * chore: page transition animation * feat: model search dropdown - deeplink * chore: bump cortex version * chore: add remote model sources * chore: model download state * chore: fix model metadata label * chore: polish model detail page markdown * test: fix test cases * chore: initialize default Hub model sources * chore: fix model stats * chore: clean up click outside and inside hooks * feat: change hub banner * chore: lint fix * chore: fix css long model id
25 lines
542 B
TypeScript
25 lines
542 B
TypeScript
import { ModelSource } from '@janhq/core'
|
|
|
|
import ModelItem from '@/screens/Hub/ModelList/ModelItem'
|
|
|
|
type Props = {
|
|
models: ModelSource[]
|
|
onSelectedModel: (model: ModelSource) => void
|
|
}
|
|
|
|
const ModelList = ({ models, onSelectedModel }: Props) => {
|
|
return (
|
|
<div className="relative h-full w-full flex-shrink-0">
|
|
{models.map((model) => (
|
|
<ModelItem
|
|
key={model.id}
|
|
model={model}
|
|
onSelectedModel={() => onSelectedModel(model)}
|
|
/>
|
|
))}
|
|
</div>
|
|
)
|
|
}
|
|
|
|
export default ModelList
|