pleroma/app/soapbox/features/account_timeline/components/header.tsx
2022-08-11 11:57:09 -05:00

32 lines
683 B
TypeScript

import React from 'react';
import InnerHeader from 'soapbox/features/account/components/header';
import MovedNote from './moved_note';
import type { Account } from 'soapbox/types/entities';
interface IHeader {
account?: Account,
}
/**
* Legacy account header middleman component that exists for no reason.
* @deprecated Use account Header directly.
*/
const Header: React.FC<IHeader> = ({ account }) => {
if (!account) {
return null;
}
return (
<>
{(account.moved && typeof account.moved === 'object') && (
<MovedNote from={account} to={account.moved} />
)}
<InnerHeader account={account} />
</>
);
};
export default Header;