setShowInfo(!showInfo)}
// linkInfo={showInfo}
/>
diff --git a/components/MobileNavigation.tsx b/components/MobileNavigation.tsx
index aecafc5..c0c8eee 100644
--- a/components/MobileNavigation.tsx
+++ b/components/MobileNavigation.tsx
@@ -1,6 +1,6 @@
-import { dropdownTriggerer } from "@/lib/client/utils";
+import { dropdownTriggerer, isPWA } from "@/lib/client/utils";
import React from "react";
-import { useEffect, useState } from "react";
+import { useState } from "react";
import NewLinkModal from "./ModalContent/NewLinkModal";
import NewCollectionModal from "./ModalContent/NewCollectionModal";
import UploadFileModal from "./ModalContent/UploadFileModal";
@@ -9,59 +9,50 @@ import MobileNavigationButton from "./MobileNavigationButton";
type Props = {};
export default function MobileNavigation({}: Props) {
- const [hasScrolled, setHasScrolled] = useState(false);
const [newLinkModal, setNewLinkModal] = useState(false);
const [newCollectionModal, setNewCollectionModal] = useState(false);
const [uploadFileModal, setUploadFileModal] = useState(false);
- useEffect(() => {
- const handleScroll = () => {
- if (window.scrollY > 0) {
- setHasScrolled(true);
- } else {
- setHasScrolled(false);
- }
- };
-
- window.addEventListener("scroll", handleScroll);
-
- return () => {
- window.removeEventListener("scroll", handleScroll);
- };
- }, []);
-
return (
<>
-
{newLinkModal ? (
diff --git a/components/MobileNavigationButton.tsx b/components/MobileNavigationButton.tsx
index 1aa31f7..a0a13e1 100644
--- a/components/MobileNavigationButton.tsx
+++ b/components/MobileNavigationButton.tsx
@@ -1,3 +1,4 @@
+import { isPWA } from "@/lib/client/utils";
import Link from "next/link";
import { useRouter } from "next/router";
import { useEffect, useState } from "react";
@@ -17,7 +18,19 @@ export default function MobileNavigationButton({
}, [router]);
return (
-
+
{
+ if (isPWA()) {
+ e.preventDefault();
+ e.stopPropagation();
+ return false;
+ } else return null;
+ }}
+ >
diff --git a/components/Modal.tsx b/components/Modal.tsx
index c68b2e0..f20d9bb 100644
--- a/components/Modal.tsx
+++ b/components/Modal.tsx
@@ -10,8 +10,10 @@ type Props = {
export default function Modal({ toggleModal, className, children }: Props) {
useEffect(() => {
document.body.style.overflow = "hidden";
+ document.body.style.position = "relative";
return () => {
document.body.style.overflow = "auto";
+ document.body.style.position = "";
};
});
diff --git a/layouts/MainLayout.tsx b/layouts/MainLayout.tsx
index 7993c45..cc7fc8f 100644
--- a/layouts/MainLayout.tsx
+++ b/layouts/MainLayout.tsx
@@ -46,7 +46,7 @@ export default function MainLayout({ children }: Props) {