Skip to content

Commit

Permalink
fix: fix file not committed
Browse files Browse the repository at this point in the history
  • Loading branch information
songquanpeng committed Jun 14, 2023
1 parent 7f9577a commit d6dbaff
Showing 1 changed file with 12 additions and 5 deletions.
17 changes: 12 additions & 5 deletions web/src/helpers/render.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,17 @@ export function renderText(text, limit) {
export function renderGroup(group) {
if (group === "") {
return <Label>default</Label>
} else if (group === "vip" || group === "pro") {
return <Label color='yellow'>{group}</Label>
} else if (group === "svip" || group === "premium") {
return <Label color='red'>{group}</Label>
}
return <Label>{group}</Label>
let groups = group.split(",");
groups.sort();
return <>
{groups.map((group) => {
if (group === "vip" || group === "pro") {
return <Label color='yellow'>{group}</Label>
} else if (group === "svip" || group === "premium") {
return <Label color='red'>{group}</Label>
}
return <Label>{group}</Label>
})}
</>
}

0 comments on commit d6dbaff

Please sign in to comment.