TheCodedProf | c86e44b | 2023-02-28 17:30:57 -0500 | [diff] [blame^] | 1 | import Image from "next/image"; |
| 2 | import Styles from "../../styles/Components/transcripts.module.css" |
| 3 | |
| 4 | function Author(props) { |
| 5 | return ( |
| 6 | <div className={Styles.container}> |
| 7 | <div className={Styles.verticalFlex} style={{width: "60px"}}> |
| 8 | <Image className={Styles.avatar} src={props.author.avatar ?? "https://picsum.photos/50"} width={50} height={50} alt=""/> {/* TODO: Add a cync icon here as a default*/} |
| 9 | </div> |
| 10 | <div className={Styles.verticalFlex} style={{width: "calc(100vw - 60px - 40px)"}}> |
| 11 | <div className={Styles.horizontalFlex}> |
| 12 | <p style={{color: props.author.topRole.color ? props.author.topRole.color : "var(--theme-ui-colors-text)", margin: "0", fontSize: "20px"}}> |
| 13 | {props.author.username}#{props.author.discriminator} |
| 14 | </p> |
| 15 | {props.author.topRole.badge ? <Image src={props.author.topRole.badge} width={20} height={20} alt=""/> : null} |
| 16 | {!props.author.bot ? <div className={Styles.botBadge}>BOT</div> : ""} |
| 17 | </div> |
| 18 | </div> |
| 19 | </div> |
| 20 | ) |
| 21 | |
| 22 | } |
| 23 | |
| 24 | export default Author; |