feat: enhance ChangeAPI and ChangePreferences components; add "API key update" functionality and save preferences feature
This commit is contained in:
@@ -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");
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user