import { IconDefinition } from "@fortawesome/fontawesome-svg-core"; import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; import { Rule } from "./rule"; interface ActivityProps { type: string; date: Date; repo: string; repoName: string; heart: string; } const TypeToString: Record = { commit_repo: "committed to", delete_branch: "deleted a branch on", merge_pull_request: "merged a PR in", create_pull_request: "created a PR in", create_branch: "created a branch in", PushEvent: "committed to", DeleteEvent: "deleted a branch on", PullRequestEvent: "created or merged a PR in", PullRequestReviewEvent: "reviewed a PR in", PullRequestReviewCommentEvent: "commented on a PR in", IssueCommentEvent: "commented on", IssuesEvent: "created or updated an issue in", close_issue: "closed an issue in", create_issue: "created an issue in", }; export const Activity = (props: ActivityProps): JSX.Element => { const { type, date, repo, repoName, heart } = props; return (
  • {heart}
    Naomi has {TypeToString[type] ?? "performed a " + type}{" "} {repoName} {" "}
  • ); };