Skip to content

Commit

Permalink
fix: model selector lack of warning message when no models downloaded (
Browse files Browse the repository at this point in the history
  • Loading branch information
louis-jan committed Apr 8, 2024
1 parent 08baf48 commit d5c4f74
Showing 1 changed file with 13 additions and 12 deletions.
25 changes: 13 additions & 12 deletions web/containers/DropdownListSidebar/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -246,14 +246,15 @@ const DropdownListSidebar = ({
</div>

<div className="border-b border-border" />
{downloadedModels.length === 0 ? (
<div className="px-4 py-2">
<p>{`Oops, you don't have a model yet.`}</p>
</div>
) : (
<SelectGroup className="py-2">
<>
{modelOptions.map((x, i) => (

<SelectGroup className="py-2">
<>
{modelOptions.length === 0 ? (
<div className="px-4 py-2">
<p>{`Oops, you don't have a model yet.`}</p>
</div>
) : (
modelOptions.map((x, i) => (
<div
key={i}
className={twMerge(
Expand Down Expand Up @@ -300,10 +301,10 @@ const DropdownListSidebar = ({
)}
</div>
</div>
))}
</>
</SelectGroup>
)}
))
)}
</>
</SelectGroup>
<div className="border-b border-border" />
<div className="flex w-full space-x-2 px-4 py-2">
<Button
Expand Down

0 comments on commit d5c4f74

Please sign in to comment.