mirror of
https://github.com/songquanpeng/one-api.git
synced 2025-10-20 19:01:02 +00:00
Co-authored-by: quzard <1191890118@qq.com>
This commit is contained in:
@@ -1,6 +1,15 @@
|
||||
import { Label } from 'semantic-ui-react';
|
||||
|
||||
export function renderText(text, limit) {
|
||||
if (text.length > limit) {
|
||||
return text.slice(0, limit - 3) + '...';
|
||||
}
|
||||
return text;
|
||||
}
|
||||
|
||||
export function renderGroup(group) {
|
||||
if (group === "") {
|
||||
return <Label>default</Label>
|
||||
}
|
||||
return <Label>{group}</Label>
|
||||
}
|
Reference in New Issue
Block a user