import React from "react"; import { useTranslation } from "react-i18next"; import { Dropdown, Button } from "react-bootstrap"; import Svg from "react-inlinesvg"; import bookmarkIcon from "bootstrap-icons/icons/bookmark.svg"; import { useAvatar } from "@/services/user"; import { timelineVisibilityTooltipTranslationMap } from "@/services/timeline"; import BlobImage from "../common/BlobImage"; import { TimelineCardComponentProps } from "../timeline-common/TimelinePageTemplateUI"; import InfoCardTemplate from "../timeline-common/InfoCardTemplate"; export type OrdinaryTimelineManageItem = "delete"; export type TimelineInfoCardProps = TimelineCardComponentProps; const TimelineInfoCard: React.FC = (props) => { const { timeline, collapse, onMember, onBookmark, onManage, syncStatus, toggleCollapse, } = props; const { t } = useTranslation(); const avatar = useAvatar(timeline?.owner?.username); return (

{timeline.title} {timeline.name}

{timeline.owner.nickname} @{timeline.owner.username}

{timeline.description}

{t(timelineVisibilityTooltipTranslationMap[timeline.visibility])}
{onBookmark != null ? ( ) : null} {onManage != null ? ( {t("timeline.manage")} onManage("property")}> {t("timeline.manageItem.property")} {t("timeline.manageItem.member")} onManage("delete")} > {t("timeline.manageItem.delete")} ) : ( )}
); }; export default TimelineInfoCard;