fix(command): fix value command

This commit is contained in:
2026-02-09 11:15:29 +07:00
parent 4384c355f9
commit ff51bd437a
3 changed files with 6 additions and 8 deletions

View File

@@ -33,7 +33,7 @@ export default function TopicsFeature() {
setError("");
setForm({
topic: "",
type: tab === "state" ? "state-reply" : "commands",
type: tab === "state" ? "state-reply" : "command",
});
setIsOpen(true);
};
@@ -58,7 +58,7 @@ export default function TopicsFeature() {
setIsOpen(false);
setForm({
topic: "",
type: tab === "state" ? "state-reply" : "commands",
type: tab === "state" ? "state-reply" : "command",
});
},
onError: () => {
@@ -159,12 +159,10 @@ export default function TopicsFeature() {
}
>
<option value="state-reply">state-reply</option>
<option value="commands">commands</option>
<option value="command">command</option>
</select>
</label>
{error && (
<p className="text-sm text-red-500">{error}</p>
)}
{error && <p className="text-sm text-red-500">{error}</p>}
<div className="mt-2 flex justify-end gap-2">
<button
type="button"

View File

@@ -24,7 +24,7 @@ export default function CommandSection() {
const handleConfirmDelete = () => {
if (!pending.topic || deleteTopic.isPending) return;
deleteTopic.mutate(
{ topic: pending.topic, type: "commands" },
{ topic: pending.topic, type: "command" },
{
onSuccess: () => setPending({ open: false, topic: "" }),
onError: () => setPending({ open: false, topic: "" }),

View File

@@ -54,7 +54,7 @@ type TopicData = {
type TopicPayload = {
topic: string;
type: "state-reply" | "commands";
type: "state-reply" | "command";
};
type TopicMutationResponse = {