add payment for SaleProprite ,add commsion,fixed error handling fiexd final things
All checks were successful
Build frontend / build (push) Successful in 1m46s
All checks were successful
Build frontend / build (push) Successful in 1m46s
This commit is contained in:
@ -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;
|
||||
|
||||
Reference in New Issue
Block a user