diff --git a/ui/src/routes/devices.$id.settings.general.factory-reset.tsx b/ui/src/routes/devices.$id.settings.general.factory-reset.tsx
new file mode 100644
index 0000000..1e3993b
--- /dev/null
+++ b/ui/src/routes/devices.$id.settings.general.factory-reset.tsx
@@ -0,0 +1,29 @@
+import { useNavigate } from "react-router-dom";
+import { useCallback } from "react";
+
+import { useJsonRpc } from "@/hooks/useJsonRpc";
+import { ConfirmDialog } from "@/components/ConfirmDialog";
+
+export default function SettingsGeneralFactoryResetRoute() {
+ const navigate = useNavigate();
+ const [send] = useJsonRpc();
+
+ const onConfirmUpdate = useCallback(() => {
+ // This is where we send the RPC to the golang binary
+ send("factoryReset", {});
+ }, [send]);
+
+ {
+ /* TODO: Migrate to using URLs instead of the global state. To simplify the refactoring, we'll keep the global state for now. */
+ }
+ return (
+ navigate("..")}
+ title="Factory Reset"
+ description="Do you want to proceed with factory resetting the JetKVM?"
+ variant="danger"
+ onConfirm={onConfirmUpdate}
+ />
+ );
+}
\ No newline at end of file
diff --git a/ui/src/routes/devices.$id.settings.general.reboot.tsx b/ui/src/routes/devices.$id.settings.general.reboot.tsx
index c6889f6..6dd8a11 100644
--- a/ui/src/routes/devices.$id.settings.general.reboot.tsx
+++ b/ui/src/routes/devices.$id.settings.general.reboot.tsx
@@ -2,7 +2,7 @@ import { useNavigate } from "react-router-dom";
import { useCallback } from "react";
import { useJsonRpc } from "@/hooks/useJsonRpc";
-import { Button } from "@components/Button";
+import { ConfirmDialog } from "@/components/ConfirmDialog";
export default function SettingsGeneralRebootRoute() {
const navigate = useNavigate();
@@ -16,51 +16,14 @@ export default function SettingsGeneralRebootRoute() {
{
/* TODO: Migrate to using URLs instead of the global state. To simplify the refactoring, we'll keep the global state for now. */
}
- return