import React from 'react';
import { Room } from 'matrix-js-sdk';
import { ForumAuthorIdentity } from './ForumAuthorIdentity';
import * as theme from './forumTheme.css';

export function ForumPostAuthor({
  room,
  sender,
  displayName,
}: {
  room: Room | null;
  sender: string;
  displayName?: string;
}) {
  return (
    <div className={theme.ForumPostAuthor}>
      <ForumAuthorIdentity
        room={room}
        sender={sender}
        displayName={displayName}
        wrapTag="span"
        compact
      />
    </div>
  );
}
