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
|
2023-05-22 09:47:49 -07:00
|
|
|
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 = {
|
2023-05-22 09:47:49 -07:00
|
|
|
moveUp: () => onMoveUp?.(id),
|
|
|
|
moveDown: () => onMoveDown?.(id),
|
2022-06-04 06:20:19 -07:00
|
|
|
};
|
|
|
|
|
2022-05-16 19:30:30 -07:00
|
|
|
return (
|
2022-06-04 06:20:19 -07:00
|
|
|
<HotKeys handlers={handlers}>
|
2023-05-09 12:16:13 -07:00
|
|
|
<div className='h-16'>
|
|
|
|
<div
|
2023-06-01 09:47:51 -07:00
|
|
|
className='focusable flex h-[42px] items-center justify-center rounded-lg border-2 border-gray-200 text-center dark:border-gray-800'
|
2023-05-09 12:16:13 -07:00
|
|
|
>
|
|
|
|
<Text theme='muted'>
|
|
|
|
<FormattedMessage
|
|
|
|
id='statuses.tombstone'
|
|
|
|
defaultMessage='One or more posts are unavailable.'
|
|
|
|
/>
|
|
|
|
</Text>
|
|
|
|
</div>
|
2022-06-04 06:20:19 -07:00
|
|
|
</div>
|
|
|
|
</HotKeys>
|
2022-05-16 19:30:30 -07:00
|
|
|
);
|
|
|
|
};
|
|
|
|
|
|
|
|
export default Tombstone;
|