Skip to content

Commit

Permalink
fixed the issue
Browse files Browse the repository at this point in the history
  • Loading branch information
Kashyap1ankit committed Nov 24, 2024
1 parent 758b88c commit 598b650
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
3 changes: 1 addition & 2 deletions components/GetNotification.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,6 @@ export default function GetNotification() {

async function subscribeUser(registration: ServiceWorkerRegistration) {
try {
console.log(registration);
if (!("Notification" in window)) {
throw new Error("This browser does not support notifications");
}
Expand Down Expand Up @@ -108,7 +107,7 @@ export default function GetNotification() {

if (response.status !== 200) throw new Error(response.message);

toast.success("Notification Is enabled", {
toast.success("Notification is enabled", {
style: {
backgroundColor: "#65a30d",
color: "white",
Expand Down
7 changes: 4 additions & 3 deletions components/Navbar/Navbar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,11 @@ export default function Navbar() {
</Link>

<div className="flex items-center gap-8">
<GetNotification />

{session.status === "authenticated" ? (
<Profile />
<>
<GetNotification />
<Profile />
</>
) : (
<>
<div className="hidden sm:inline-flex">
Expand Down

0 comments on commit 598b650

Please sign in to comment.