mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2025-02-18 03:11:31 +01:00
appease the linter
This commit is contained in:
parent
a4f0fb9e25
commit
f5bc524f1e
@ -71,6 +71,7 @@ function EmojiDetailForm({ data: emoji }) {
|
||||
!form.category.isNew) {
|
||||
modifyEmoji();
|
||||
}
|
||||
/* eslint-disable-next-line react-hooks/exhaustive-deps */
|
||||
}, [form.category.hasChanged(), form.category.isNew, form.category.state.open]);
|
||||
|
||||
const [deleteEmoji, deleteResult] = query.useDeleteEmojiMutation();
|
||||
@ -144,22 +145,4 @@ function EmojiDetailForm({ data: emoji }) {
|
||||
</form>
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
function DeleteButton({ id }) {
|
||||
// TODO: confirmation dialog?
|
||||
const [deleteEmoji, deleteResult] = query.useDeleteEmojiMutation();
|
||||
|
||||
let text = "Delete";
|
||||
if (deleteResult.isLoading) {
|
||||
text = "Deleting...";
|
||||
}
|
||||
|
||||
if (deleteResult.isSuccess) {
|
||||
return <Redirect to={base} />;
|
||||
}
|
||||
|
||||
return (
|
||||
<button className="danger" onClick={() => deleteEmoji(id)} disabled={deleteResult.isLoading}>{text}</button>
|
||||
);
|
||||
}
|
@ -18,13 +18,11 @@
|
||||
|
||||
"use strict";
|
||||
|
||||
const Promise = require('bluebird');
|
||||
const React = require("react");
|
||||
|
||||
const query = require("../../../lib/query");
|
||||
|
||||
const {
|
||||
useTextInput,
|
||||
useFileInput,
|
||||
useComboBoxInput
|
||||
} = require("../../../lib/form");
|
||||
|
Loading…
Reference in New Issue
Block a user