in src/pages/github/github.tsx [127:140]
function mapStateToIcon(
state: State<Context, Events>
): 'incomplete' | 'complete' | 'danger' | 'loading' {
if (state.matches('success')) {
return 'complete';
}
if (state.matches('fetching')) {
return 'loading';
}
if (state.matches('error')) {
return 'danger';
}
return 'incomplete';
}