import type { UiTheme } from "../theme" type TopBarProps = { currentBranch: string tracking: { loading: boolean upstream: string | null ahead: number behind: number } theme: UiTheme } export function TopBar({ currentBranch, tracking, theme }: TopBarProps) { return ( {currentBranch} {tracking.loading ? ( … loading ) : ( {tracking.upstream ? {tracking.upstream} : null} {!tracking.upstream ? ◌ not pushed : null} {tracking.upstream && tracking.ahead === 0 && tracking.behind === 0 ? ( ✓ up to date ) : null} {tracking.ahead > 0 ? ( ↑{tracking.ahead} ) : null} {tracking.behind > 0 ? ( ↓{tracking.behind} ) : null} )} ) }