feat: enhance ChangeAPI and ChangePreferences components; add "API key update" functionality and save preferences feature

This commit is contained in:
2025-08-01 01:06:58 +02:00
parent 6f3d945213
commit 8341e50dc8
7 changed files with 250 additions and 41 deletions
+2 -1
View File
@@ -2,6 +2,7 @@ import Cookies from "js-cookie";
import { myToast } from "./toastify";
export const changeAPIcookie = (newApiKey: string) => {
let apiKey15 = newApiKey.slice(0, 15);
Cookies.set("apiKey", newApiKey);
myToast("API key updated successfully!", "success");
myToast("API key updated successfully!" + " " + "Your new API key: " + apiKey15 + "...", "success");
};