export default asCard()

in src/components/Card/Post/Expanded.js [108:158]


export default asCard(
  ({
    className,
    ConditionalAnchor,
    banner,
    onContributorPage,
    authors,
    title,
    description,
    href,
  }) => {
    const [firstAuthor] = authors;
    const {to, name, twitter, github, avatar} = firstAuthor;
    const handle = twitter || github;
    const encodedHref = encodeURI(href);
    // do this at build time!
    const faviconSrc = `https://www.google.com/s2/favicons?domain=${encodedHref}`;

    return (
      <LazyLoad>
        <ConditionalAnchor
          css={styles}
          className={classNames(className, 'post-expanded')}
        >
          {banner && (
            <div className='banner'>
              <Img {...banner} />
            </div>
          )}

          <div className='body'>
            <div>
              {href && (
                <div className='favicon'>
                  <img src={faviconSrc} alt='content platform' />
                </div>
              )}
              <Text h3 children={title} />
              <Text p children={description} />
            </div>

            {!onContributorPage && (
              <div className='author'>
                <Author {...{to, name, handle, avatar}} />
              </div>
            )}
          </div>
        </ConditionalAnchor>
      </LazyLoad>
    );
  },