add payment for SaleProprite ,add commsion,fixed error handling fiexd final things
All checks were successful
Build frontend / build (push) Successful in 1m46s

This commit is contained in:
hamzaobed7
2026-08-18 01:24:18 +03:00
parent 5592d9fbd2
commit 3472dc1175
10 changed files with 793 additions and 1070 deletions

View File

@ -1,5 +1,6 @@
import { initializeApp, getApps } from "firebase/app";
import { getMessaging, getToken, onMessage } from "firebase/messaging";
import { Cookies } from 'js-cookie';
const firebaseConfig = {
apiKey: "AIzaSyBZV7KBLRJSTApahfrO8lBesmIM3zNRSaY",
@ -45,8 +46,7 @@ export async function requestNotificationPermission() {
// Send token to backend
if (token) {
try {
const authToken = localStorage.getItem("auth_token");
const authToken = Cookies.get(auth_token);
if (authToken) {
const apiBase =
process.env.NEXT_PUBLIC_API_URL ||
@ -66,7 +66,6 @@ export async function requestNotificationPermission() {
}
} catch (err) {}
}
return token;
} catch (err) {
return null;