Skip to content

Commit

Permalink
Use clearer registration status message
Browse files Browse the repository at this point in the history
  • Loading branch information
tomasr8 committed Dec 6, 2023
1 parent 9e05732 commit b2c50e6
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/pages/participant/RegistrationState.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,16 @@ import {RegistrationState as _RegistrationState} from '../../db/db';

export function RegistrationState({state}: {state: _RegistrationState}) {
let color;
let text: string = state;

switch (state) {
case 'complete':
color = 'green';
break;
case 'pending':
color = 'yellow';
text = 'pending approval';
break;
case 'unpaid':
color = 'yellow';
break;
Expand All @@ -22,7 +26,7 @@ export function RegistrationState({state}: {state: _RegistrationState}) {
className={`w-fit rounded-full bg-${color}-100 px-2.5 py-1 text-sm font-medium
text-${color}-800 dark:bg-${color}-900 dark:text-${color}-300`}
>
Registration {state}
Registration {text}
</span>
);
}

0 comments on commit b2c50e6

Please sign in to comment.