Skip to content

Commit

Permalink
Add PlayabilityBadge for UI
Browse files Browse the repository at this point in the history
  • Loading branch information
Ryu1845 committed Aug 4, 2022
1 parent c381a40 commit 44fee01
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions web/src/pages/TasksPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,29 @@ import {
useQueryTasks,
} from '../api/tasks';

const PlayabilityBadge = ({ state }: { state: State }) => (
<Badge
color={
state === 'Live'
? 'pink'
: state === 'Members Only' || state === 'Login Required'
? 'grape'
: state === 'Unlisted'
? 'indigo'
: state === 'Copyrighted'
? 'cyan'
: state === 'Removed' || state === 'Privated'
? 'orange'
: state === 'OK' || state === 'Offline'
? 'gray'
: 'violet'
}
variant="filled"
>
{stateString(state)}
</Badge>
);

const TaskStateBadge = ({ state }: { state: State }) => (
<Badge
color={
Expand Down

0 comments on commit 44fee01

Please sign in to comment.