mirror of
https://github.com/pds-nest/nest.git
synced 2024-11-26 06:54:18 +00:00
33 lines
935 B
JavaScript
33 lines
935 B
JavaScript
|
import React from "react"
|
||
|
import SummaryBase from "../base/summary/SummaryBase"
|
||
|
import SummaryLeft from "../base/summary/SummaryLeft"
|
||
|
import { faComment, faMapPin } from "@fortawesome/free-solid-svg-icons"
|
||
|
import SummaryText from "../base/summary/SummaryText"
|
||
|
import SummaryRight from "../base/summary/SummaryRight"
|
||
|
|
||
|
|
||
|
export default function SummaryTweet({ tweet, ...props }) {
|
||
|
let icon
|
||
|
if(tweet.place) {
|
||
|
icon = faMapPin
|
||
|
}
|
||
|
else {
|
||
|
icon = faComment
|
||
|
}
|
||
|
|
||
|
return (
|
||
|
<SummaryBase {...props}>
|
||
|
<SummaryLeft
|
||
|
icon={icon}
|
||
|
title={`@${tweet.poster}`}
|
||
|
subtitle={tweet.place}
|
||
|
onClick={() => window.open(`https://twitter.com/${tweet.poster}/status/${tweet.snowflake}`)}
|
||
|
/>
|
||
|
<SummaryText>
|
||
|
{tweet.content}
|
||
|
</SummaryText>
|
||
|
<SummaryRight/>
|
||
|
</SummaryBase>
|
||
|
)
|
||
|
}
|