import { Col, ListGroupItem, Row } from "reactstrap";
import { observer } from "mobx-react-lite";
import { toDate } from "src/Utility";
import { AvatarWwwLevelsAPI } from "src/wwwAPI";

export default observer(({ title, date }: AvatarWwwLevelsAPI) => {
  return (
    <ListGroupItem>
      <Row className="g-0">
        <Col className="m-1" xs="auto">
          <span>{title}</span>
          <br />
          {date && <span className="fittedText">{toDate(date)}</span>}
        </Col>
      </Row>
    </ListGroupItem>
  );
});
