From 7625e29541ee44e0e3058bb14ca07868a60fa04c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Buczek?= Date: Mon, 9 Dec 2024 17:00:42 +0100 Subject: [PATCH 1/3] fix: #151 fixed opacity and z-index of sidebar during animation --- src/components/layout/Sidebar.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/layout/Sidebar.tsx b/src/components/layout/Sidebar.tsx index d8d83dd..f615b3c 100644 --- a/src/components/layout/Sidebar.tsx +++ b/src/components/layout/Sidebar.tsx @@ -102,7 +102,7 @@ export default function Sidebar() { {name} {name} From f39414cba075d865a15b72fc44d6a200ae0db3b2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Buczek?= Date: Mon, 9 Dec 2024 17:05:49 +0100 Subject: [PATCH 2/3] feat: #151 added handleClose in SidebarContext --- src/components/layout/Sidebar.tsx | 1 + src/contexts/SidebarContext.tsx | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/src/components/layout/Sidebar.tsx b/src/components/layout/Sidebar.tsx index f615b3c..db4954e 100644 --- a/src/components/layout/Sidebar.tsx +++ b/src/components/layout/Sidebar.tsx @@ -96,6 +96,7 @@ export default function Sidebar() {
diff --git a/src/contexts/SidebarContext.tsx b/src/contexts/SidebarContext.tsx index 7391d20..9d427fc 100755 --- a/src/contexts/SidebarContext.tsx +++ b/src/contexts/SidebarContext.tsx @@ -4,6 +4,7 @@ import React, { useContext, useState } from 'react'; type SidebarContextType = { isOpen: boolean; handleToggle: () => void; + handleClose: () => void; }; const SidebarContext = React.createContext(undefined); @@ -15,11 +16,14 @@ export const SidebarProvider = ({ children }: { children: React.ReactNode }) => const handleToggle = () => setIsOpen((state) => !state); + const handleClose = () => setIsOpen(false); + return ( {children} From 276c8c65c55966bc4775bd190bc1253e59db8f0a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Buczek?= Date: Mon, 9 Dec 2024 17:11:18 +0100 Subject: [PATCH 3/3] fix: #151 eslint error's fixed --- src/app/api/logout/route.ts | 2 +- src/components/ErrorBoundary.tsx | 2 +- src/components/layout/Sidebar.tsx | 2 +- src/contexts/SidebarContext.tsx | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/app/api/logout/route.ts b/src/app/api/logout/route.ts index e9d526a..b52a169 100755 --- a/src/app/api/logout/route.ts +++ b/src/app/api/logout/route.ts @@ -4,7 +4,7 @@ import { NextRequest, NextResponse } from 'next/server'; import AuthService from '@/services/auth/authService'; const ACCESS_TOKEN_COOKIE = 'AUTH_CONTEXT'; -const REFRESH_TOKEN_COOKIE = 'AUTH_PERSIST'; +// const REFRESH_TOKEN_COOKIE = 'AUTH_PERSIST'; const accessCookie = `${ACCESS_TOKEN_COOKIE}=; Path=/; Max-Age=0; SameSite=Lax;`; const refreshCookie = `${ACCESS_TOKEN_COOKIE}=; Path=/; Max-Age=0; SameSite=Lax;`; diff --git a/src/components/ErrorBoundary.tsx b/src/components/ErrorBoundary.tsx index dac612d..a37d50a 100644 --- a/src/components/ErrorBoundary.tsx +++ b/src/components/ErrorBoundary.tsx @@ -17,7 +17,7 @@ class ErrorBoundary extends React.Component
{name} diff --git a/src/contexts/SidebarContext.tsx b/src/contexts/SidebarContext.tsx index 9d427fc..3cd1403 100755 --- a/src/contexts/SidebarContext.tsx +++ b/src/contexts/SidebarContext.tsx @@ -23,7 +23,7 @@ export const SidebarProvider = ({ children }: { children: React.ReactNode }) => value={{ isOpen, handleToggle, - handleClose + handleClose, }} > {children}