-
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
migrate: dummy repositories migrate to svelte store (#150)
* repositories migrated to store with some problems * null error fixed
- Loading branch information
Showing
3 changed files
with
40 additions
and
36 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,47 +1,51 @@ | ||
import useModelStore, { IModel } from '@/state/modelStore' | ||
import React from 'react' | ||
import { BiLike } from 'react-icons/bi' | ||
import { GoDownload } from 'react-icons/go' | ||
|
||
export default function Repository({ repository }) { | ||
export default function Repository() { | ||
const { models } = useModelStore() | ||
|
||
return ( | ||
<div> | ||
<div className=""> | ||
{repository.map((item) => ( | ||
<div | ||
key={item.id} | ||
className=" border border-primary_9 flex px-5 mb-5 py-3 items-center rounded-xl h-[170px] min-h-[170px]" | ||
> | ||
<div className="w-[80%] h-full"> | ||
<div className=" flex h-[25%] items-start "> | ||
<span className="bg-primary_11 rounded-full text-primary_8 py-1 px-3"> | ||
{item.label} | ||
</span> | ||
</div> | ||
<div className="h-[20%]"> | ||
<span className="text-lg ">{item.title}</span> | ||
|
||
{/* extract the values of the object */} | ||
{models && Object.values(models).map(model => ( | ||
<div | ||
key={model.id} | ||
className=" border border-primary_9 flex px-5 mb-5 py-3 items-center rounded-xl h-[170px] min-h-[170px]" | ||
> | ||
<div className="w-[80%] h-full"> | ||
<div className=" flex h-[25%] items-start "> | ||
<span className="bg-primary_11 rounded-full text-primary_8 py-1 px-3"> | ||
{'Text Generation'} | ||
</span> | ||
</div> | ||
<div className="h-[20%]"> | ||
<span className="text-lg ">{model.name}</span> | ||
</div> | ||
<div className="flex items-center h-[40%]"> | ||
<p className="text-xs">{model.description} </p> | ||
</div> | ||
<div className=" h-[15%] text-xs text-primary_8 flex gap-4"> | ||
<div> | ||
<span>Updated {"12 2023"}</span> | ||
</div> | ||
<div className="flex items-center h-[40%]"> | ||
<p className="text-xs">{item.description} </p> | ||
<div className="flex"> | ||
<GoDownload /> | ||
<span>{'12k'}</span> | ||
</div> | ||
<div className=" h-[15%] text-xs text-primary_8 flex gap-4"> | ||
<div> | ||
<span>Updated {item.time}</span> | ||
</div> | ||
<div className="flex"> | ||
<GoDownload /> | ||
<span>{item.dowloaded}</span> | ||
</div> | ||
<div className="flex"> | ||
<BiLike /> | ||
<span>{item.likes}</span> | ||
</div> | ||
<div className="flex"> | ||
<BiLike /> | ||
<span>{'50'}</span> | ||
</div> | ||
</div> | ||
|
||
<div className="w-[20%] h-full bg-primary_11 "></div> | ||
</div> | ||
))} | ||
</div> | ||
|
||
<div className="w-[20%] h-full bg-primary_11 "></div> | ||
</div> | ||
))} | ||
|
||
</div> | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters