Skip to content

Commit

Permalink
CW-service-worker-performance Added firefox permissions
Browse files Browse the repository at this point in the history
  • Loading branch information
MeyerPV committed Sep 10, 2024
1 parent 1a36c9a commit 1177161
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/shared/components/Header/Header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { useDispatch, useSelector } from "react-redux";
import { Link, RouteProps, useHistory } from "react-router-dom";
import classNames from "classnames";
import { Routes } from "@/pages/MyAccount/components/Routes";
import { NotificationService } from "@/services";
import { Loader } from "@/shared/components";
import {
useAnyMandatoryRoles,
Expand Down Expand Up @@ -82,7 +83,8 @@ const Header = () => {
setShowAccountLinks(isMyAccountRoute);
}, [showMenu, isMyAccountRoute]);

const handleLogIn = useCallback(() => {
const handleLogIn = useCallback(async () => {
await NotificationService.requestPermissions();
dispatch(setLoginModalState({ isShowing: true }));
setShowMenu(false);
}, [dispatch]);
Expand Down Expand Up @@ -116,7 +118,8 @@ const Header = () => {
dispatch(logOut());
};

const handleLaunchApp = () => {
const handleLaunchApp = async () => {
await NotificationService.requestPermissions();
history.push(ROUTE_PATHS.INBOX);
};

Expand Down

0 comments on commit 1177161

Please sign in to comment.