import { t } from '@/lib/i18n'
import { RelayList } from './RelayList'
import type { RelayManagerContentProps } from './types'
export function RelayManagerContent(params: RelayManagerContentProps): React.ReactElement {
return (
{params.error ?
: null}
{params.showAddForm ?
: null}
)
}
function ErrorBanner(params: { error: string; onClear: () => void }): React.ReactElement {
return (
{params.error}
×
)
}
function Header(params: { showAddForm: boolean; onToggleAddForm: () => void }): React.ReactElement {
return (
{t('settings.relay.title')}
{params.showAddForm ? t('settings.relay.add.cancel') : t('settings.relay.addButton')}
)
}
function AddForm(params: { newUrl: string; onNewUrlChange: (value: string) => void; onAdd: () => void; onCancel: () => void }): React.ReactElement {
return (
)
}
function Notes(): React.ReactElement {
return (
{t('settings.relay.note.title')} {t('settings.relay.note.priority')}
{t('settings.relay.note.rotation')}
)
}