working on clerk notification

This commit is contained in:
nospeedlimitindonesia
2024-07-28 09:44:29 +00:00
parent ae79c9fc5a
commit 93df0458e6
7 changed files with 45 additions and 36 deletions

View File

@@ -1,5 +1,5 @@
import API_BASE_URL from "../config.js";
import { getLocalStorage } from "./localStorageHelpers";
import { getLocalStorage, updateLocalStorage } from "./localStorageHelpers";
import { getItemsByCafeId } from "../helpers/cartHelpers.js";
export const handlePaymentFromClerk = async (
@@ -148,6 +148,8 @@ export const handlePaymentFromGuestDevice = async (
if (response.ok) {
// Handle success response
console.log("Transaction successful!");
const data = await response.json();
updateLocalStorage("auth", data.auth);
// Optionally return response data or handle further actions upon success
return true;
} else {