import { Linking, Text, View } from 'react-native'; import { Button } from '~/components/ui/button'; import { Card } from '~/components/ui/card'; import { EmptyState } from '~/components/ui/empty-state'; import { formatDateTime, truncate } from '~/utils/format'; type Commit = { _id: string; authorLogin?: string; authorName?: string; committedAt?: number; htmlUrl?: string; message: string; }; export const SpoonCommitList = ({ commits, emptyDescription, emptyTitle, intro, showOpenButton = false, }: { commits: Commit[]; emptyDescription: string; emptyTitle: string; intro?: string; showOpenButton?: boolean; }) => ( {intro ? ( {intro} ) : null} {commits.length ? ( commits.map((commit) => ( {truncate(commit.message, 100)} {commit.authorLogin ?? commit.authorName ?? 'unknown'} ยท{' '} {formatDateTime(commit.committedAt)} {showOpenButton && commit.htmlUrl ? ( ) : null} )) ) : ( )} );