2022-05-16 19:30:30 -07:00
|
|
|
import React from 'react';
|
2022-06-04 06:20:19 -07:00
|
|
|
import { HotKeys } from 'react-hotkeys';
|
2022-05-16 19:30:30 -07:00
|
|
|
import { FormattedMessage } from 'react-intl';
|
|
|
|
|
|
|
|
import { Text } from 'soapbox/components/ui';
|
|
|
|
|
2022-06-04 06:20:19 -07:00
|
|
|
interface ITombstone {
|
2023-02-15 13:26:27 -08:00
|
|
|
id: string
|
|
|
|
onMoveUp: (statusId: string) => void
|
|
|
|
onMoveDown: (statusId: string) => void
|
2022-06-04 06:20:19 -07:00
|
|
|
}
|
|
|
|
|
2022-05-16 19:30:30 -07:00
|
|
|
/** Represents a deleted item. */
|
2022-06-04 06:20:19 -07:00
|
|
|
const Tombstone: React.FC<ITombstone> = ({ id, onMoveUp, onMoveDown }) => {
|
|
|
|
const handlers = {
|
|
|
|
moveUp: () => onMoveUp(id),
|
|
|
|
moveDown: () => onMoveDown(id),
|
|
|
|
};
|
|
|
|
|
2022-05-16 19:30:30 -07:00
|
|
|
return (
|
2022-06-04 06:20:19 -07:00
|
|
|
<HotKeys handlers={handlers}>
|
2023-02-01 14:13:42 -08:00
|
|
|
<div className='focusable flex items-center justify-center border border-solid border-gray-200 bg-gray-100 p-9 dark:border-gray-800 dark:bg-gray-900 sm:rounded-xl' tabIndex={0}>
|
2022-06-04 06:20:19 -07:00
|
|
|
<Text>
|
2022-07-14 09:20:07 -07:00
|
|
|
<FormattedMessage id='statuses.tombstone' defaultMessage='One or more posts are unavailable.' />
|
2022-06-04 06:20:19 -07:00
|
|
|
</Text>
|
|
|
|
</div>
|
|
|
|
</HotKeys>
|
2022-05-16 19:30:30 -07:00
|
|
|
);
|
|
|
|
};
|
|
|
|
|
|
|
|
export default Tombstone;
|