Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion components/settings-forms.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"use client";

import { useActionState, useRef, useState } from "react";
import { useRouter } from "next/navigation";
import {
Download,
KeyRound,
Expand Down Expand Up @@ -486,6 +487,7 @@ export function PasswordForm() {
}

export function DataPortability() {
const router = useRouter();
const restoreRef = useRef<HTMLInputElement>(null);
const [busy, setBusy] = useState(false);

Expand Down Expand Up @@ -521,7 +523,7 @@ export function DataPortability() {
};
if (!response.ok) throw new Error(result.error || "Upload failed.");
toast.success(result.message);
window.location.assign("/");
router.push("/");
} catch (error) {
toast.error(error instanceof Error ? error.message : "Upload failed.");
} finally {
Expand Down
Loading