function StoryListItem(props: { item: Parser.Item; index: number }) {
const icon = getIcon(props.index + 1);
const points = getPoints(props.item);
const comments = getComments(props.item);
title={props.item.title ?? "No title"}
subtitle={props.item.creator}
accessoryTitle={`👍 ${points} 💬 ${comments}`}
const iconToEmojiMap = new Map<number, string>([
function getIcon(index: number) {
return iconToEmojiMap.get(index) ?? "⏺";
function getPoints(item: Parser.Item) {
const matches = item.contentSnippet?.match(/(?<=Points:\s*)(\d+)/g);
function getComments(item: Parser.Item) {
const matches = item.contentSnippet?.match(/(?<=Comments:\s*)(\d+)/g);