refactor: delete empty components

This commit is contained in:
Junyan Qin
2025-05-08 21:34:04 +08:00
parent 17762d9bd8
commit 8007084f8c
3 changed files with 53 additions and 99 deletions
+20 -36
View File
@@ -98,43 +98,27 @@ export default function LLMConfigPage() {
/>
</DialogContent>
</Dialog>
<div className={`${styles.modelListContainer}`}>
{cardList.length > 0 && (
<div className={`${styles.modelListContainer}`}>
<CreateCardComponent
width={'24rem'}
height={'10rem'}
plusSize={'90px'}
onClick={handleCreateModelClick}
/>
{cardList.map((cardVO) => {
return (
<div
key={cardVO.id}
onClick={() => {
selectLLM(cardVO);
}}
>
<LLMCard cardVO={cardVO}></LLMCard>
</div>
);
})}
</div>
)}
{cardList.length === 0 && (
<div className={`${styles.emptyContainer}`}>
<EmptyAndCreateComponent
title={'模型列表空空如也~'}
subTitle={'快去创建一个吧!'}
buttonText={'创建模型 +'}
onButtonClick={() => {
handleCreateModelClick();
}}
/>
</div>
)}
<CreateCardComponent
width={'24rem'}
height={'10rem'}
plusSize={'90px'}
onClick={handleCreateModelClick}
/>
{cardList.map((cardVO) => {
return (
<div
key={cardVO.id}
onClick={() => {
selectLLM(cardVO);
}}
>
<LLMCard cardVO={cardVO}></LLMCard>
</div>
);
})}
</div>
</div>
);
}