-
@@ -47,7 +57,7 @@ const MobileMenu = ({ isOpen, handleClose }: Props) => {
{
))}
-
+
);
};
diff --git a/client/components/shared/Overlays/MobileMenu/index.ts b/client/components/shared/Overlays/MobileMenu/index.ts
new file mode 100644
index 00000000..0bbcf018
--- /dev/null
+++ b/client/components/shared/Overlays/MobileMenu/index.ts
@@ -0,0 +1 @@
+export { default } from "./MobileMenu";
diff --git a/client/components/shared/Overlays/MobileMenu/styles.module.scss b/client/components/shared/Overlays/MobileMenu/styles.module.scss
new file mode 100644
index 00000000..f1be7ca0
--- /dev/null
+++ b/client/components/shared/Overlays/MobileMenu/styles.module.scss
@@ -0,0 +1,77 @@
+.MobileMenu {
+ animation: slide-from-right 0.5s forwards;
+ overflow: hidden;
+ position: fixed;
+ top: 0;
+ width: 100vw;
+ height: 100vh;
+ z-index: 101;
+ gap: 32px;
+ background-color: var(--slight-layer2);
+ transition-duration: 500ms;
+ opacity: 0.95;
+ .Navigator {
+ display: flex;
+ flex-direction: column;
+ align-items: center;
+ gap: 2.5rem;
+ font-size: 25px;
+ font-weight: 700;
+ button {
+ border: none;
+ background: none;
+ font-size: 25px;
+ font-weight: 700;
+ color: var(--bg-element2);
+ }
+ }
+
+ .current {
+ text-decoration-color: var(--primary1);
+ text-underline-offset: 8px;
+ text-decoration-line: underline;
+ text-decoration-thickness: 4px;
+ }
+
+ .closeArea {
+ width: 100%;
+ height: 120px;
+ display: flex;
+ align-items: center;
+ justify-content: flex-end;
+ button {
+ border: none;
+ background: none;
+ width: 50px;
+ height: 50px;
+ margin-right: 5%;
+ svg {
+ width: 45px;
+ height: 45px;
+ fill: var(--bg-element2);
+ }
+ }
+ }
+}
+
+.closeAnimation {
+ animation: slide-to-right 0.5s forwards;
+}
+
+@keyframes slide-from-right {
+ 0% {
+ left: 100%;
+ }
+ 100% {
+ left: 0;
+ }
+}
+
+@keyframes slide-to-right {
+ 0% {
+ left: 0%;
+ }
+ 100% {
+ left: 100%;
+ }
+}
diff --git a/client/components/shared/Overlays/Overlays.tsx b/client/components/shared/Overlays/Overlays.tsx
new file mode 100644
index 00000000..557ffae6
--- /dev/null
+++ b/client/components/shared/Overlays/Overlays.tsx
@@ -0,0 +1,55 @@
+"use client";
+
+import { useOverlayStateContext } from "@contexts/overlayContex";
+import { useOverlay } from "@hooks";
+import React from "react";
+import dynamic from "next/dynamic";
+
+const AuthModal = dynamic(() => import("./AuthModal"), {
+ ssr: false,
+});
+
+const SeriesFormModal = dynamic(() => import("./SeriesFormModal"), {
+ ssr: false,
+});
+
+const MobileMenuModal = dynamic(() => import("./MobileMenu"), {
+ ssr: false,
+});
+
+export const OVERLAYS = {
+ AUTH_MODAL: AuthModal,
+ SERIES_FORM_MODAL: SeriesFormModal,
+ MOBILE_MENU: MobileMenuModal,
+};
+
+const Overlays = () => {
+ const openedOverlays = useOverlayStateContext();
+ const { closeOverlay } = useOverlay();
+ return (
+ <>
+ {openedOverlays.map(({ Component, props }, idx) => {
+ const onClose = () => {
+ closeOverlay(Component);
+ };
+
+ const onExit = (time: number) => {
+ setTimeout(() => {
+ onClose();
+ }, time);
+ };
+
+ return (
+