fix(command): fix value command
This commit is contained in:
@@ -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"
|
||||
|
||||
@@ -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: "" }),
|
||||
|
||||
2
src/repositories/device/types.d.ts
vendored
2
src/repositories/device/types.d.ts
vendored
@@ -54,7 +54,7 @@ type TopicData = {
|
||||
|
||||
type TopicPayload = {
|
||||
topic: string;
|
||||
type: "state-reply" | "commands";
|
||||
type: "state-reply" | "command";
|
||||
};
|
||||
|
||||
type TopicMutationResponse = {
|
||||
|
||||
Reference in New Issue
Block a user