Fixed table action appearing in wrong position

refs https://github.com/TryGhost/Product/issues/3823
This commit is contained in:
Djordje Vlaisavljevic 2023-09-07 11:43:14 +01:00
parent 6e7089e58a
commit 3d9f22c13a

View File

@ -19,19 +19,21 @@ const RecommendationItem: React.FC<{recommendation: Recommendation}> = ({recomme
const {mutateAsync: deleteRecommendation} = useDeleteRecommendation();
const action = (
<Button color='red' label='Remove' link onClick={() => {
NiceModal.show(ConfirmationModal, {
title: 'Remove recommendation',
prompt: <>
<p>Your recommendation <strong>{recommendation.title}</strong> will no longer be visible to your audience.</p>
</>,
okLabel: 'Remove',
onOk: async (modal) => {
await deleteRecommendation(recommendation);
modal?.remove();
}
});
}} />
<div className="flex items-center justify-end">
<Button color='red' label='Remove' link onClick={() => {
NiceModal.show(ConfirmationModal, {
title: 'Remove recommendation',
prompt: <>
<p>Your recommendation <strong>{recommendation.title}</strong> will no longer be visible to your audience.</p>
</>,
okLabel: 'Remove',
onOk: async (modal) => {
await deleteRecommendation(recommendation);
modal?.remove();
}
});
}} />
</div>
);
const showDetails = () => {