import { SingleEvent } from '@api/events';
import { Text } from 'react-native';
export const renderSpotsText = (e: SingleEvent) => {
switch (e.registrations_info) {
case 2:
return (
{(e.capacity ?? 0) - (e.available ?? 0)} total
spots available
);
case 3:
return (
{e.available} spots remaining
);
case 4:
return (
{e.participants} Nomads joined
);
case 5:
return (
{e.available ?? (e.capacity ?? 0) - (e.participants ?? 0)} / {e.capacity}
{' '}
spots available
);
default:
return '';
}
};