2021-05-18 17:15:53 +00:00
|
|
|
import React from "react"
|
|
|
|
import SummaryBase from "../base/summary/SummaryBase"
|
|
|
|
import SummaryLeft from "../base/summary/SummaryLeft"
|
2021-05-20 10:16:01 +00:00
|
|
|
import { faComment, faLocationArrow, faMapMarkerAlt } from "@fortawesome/free-solid-svg-icons"
|
2021-05-18 17:15:53 +00:00
|
|
|
import SummaryText from "../base/summary/SummaryText"
|
|
|
|
import SummaryRight from "../base/summary/SummaryRight"
|
|
|
|
|
|
|
|
|
|
|
|
export default function SummaryTweet({ tweet, ...props }) {
|
|
|
|
let icon
|
2021-05-20 09:39:40 +00:00
|
|
|
if(tweet["location"]) {
|
|
|
|
icon = faMapMarkerAlt
|
|
|
|
}
|
|
|
|
else if(tweet["place"]) {
|
|
|
|
icon = faLocationArrow
|
2021-05-18 17:15:53 +00:00
|
|
|
}
|
|
|
|
else {
|
|
|
|
icon = faComment
|
|
|
|
}
|
|
|
|
|
|
|
|
return (
|
|
|
|
<SummaryBase {...props}>
|
|
|
|
<SummaryLeft
|
|
|
|
icon={icon}
|
2021-05-20 09:39:40 +00:00
|
|
|
title={`@${tweet["poster"]}`}
|
|
|
|
subtitle={new Date(tweet["insert_time"]).toLocaleString()}
|
|
|
|
onClick={() => window.open(`https://twitter.com/${tweet["poster"]}/status/${tweet["snowflake"]}`)}
|
2021-05-18 17:15:53 +00:00
|
|
|
/>
|
|
|
|
<SummaryText>
|
|
|
|
{tweet.content}
|
|
|
|
</SummaryText>
|
|
|
|
<SummaryRight/>
|
|
|
|
</SummaryBase>
|
|
|
|
)
|
|
|
|
}
|