fixed route Notification
All checks were successful
Build frontend / build (push) Successful in 1m33s
All checks were successful
Build frontend / build (push) Successful in 1m33s
This commit is contained in:
@ -88,10 +88,8 @@ export default function NotificationHandler() {
|
||||
|
||||
async function handleEnable() {
|
||||
setShowPrompt(false);
|
||||
|
||||
// This MUST be synchronous from a user gesture
|
||||
const permission = await Notification.requestPermission();
|
||||
|
||||
if (permission === "granted") {
|
||||
await setupFCM();
|
||||
}
|
||||
|
||||
@ -9,7 +9,7 @@ export default function useAuth() {
|
||||
name: authUser?.name ?? "Not found",
|
||||
email: authUser?.email ?? "Not found",
|
||||
isOwner: role?.includes("Owner"),
|
||||
isAgent: role?.includes("RealEstateAgent",""),
|
||||
isAgent: role?.includes("RealEstateAgent"),
|
||||
isCustomer: role?.includes("Customer"),
|
||||
role: role,
|
||||
isGuest: !authUser,
|
||||
|
||||
@ -66,9 +66,7 @@ const AuthService = Object.freeze({
|
||||
*/
|
||||
getCachedUser() {
|
||||
const user = Cookies.get(USER_KEY);
|
||||
|
||||
if (!user) return null;
|
||||
|
||||
try {
|
||||
return JSON.parse(user);
|
||||
} catch {
|
||||
|
||||
Reference in New Issue
Block a user