bigbuffet-rw/app/soapbox/features/status/containers/quoted_status_container.tsx
2022-06-08 11:07:41 -05:00

28 lines
631 B
TypeScript

import React from 'react';
import QuotedStatus from 'soapbox/components/quoted-status';
import { useAppSelector } from 'soapbox/hooks';
import { makeGetStatus } from 'soapbox/selectors';
const getStatus = makeGetStatus();
interface IQuotedStatusContainer {
/** Status ID to the quoted status. */
statusId: string,
}
const QuotedStatusContainer: React.FC<IQuotedStatusContainer> = ({ statusId }) => {
const status = useAppSelector(state => getStatus(state, { id: statusId }));
if (!status) {
return null;
}
return (
<QuotedStatus
status={status}
/>
);
};
export default QuotedStatusContainer;