From 76ed3e5f6b8e807b171ea1d2f46b6f6297a8bead Mon Sep 17 00:00:00 2001 From: Thomas Date: Fri, 20 Jan 2023 17:50:36 -0800 Subject: [PATCH 1/2] [Mini] Fixed Filter Bug --- components/Layout.tsx | 27 ++++++++++++++------------- components/NavigationBar.tsx | 12 +++++++++++- hooks/useCurrentState.tsx | 2 +- 3 files changed, 26 insertions(+), 15 deletions(-) diff --git a/components/Layout.tsx b/components/Layout.tsx index 29108e0..b1b2e20 100644 --- a/components/Layout.tsx +++ b/components/Layout.tsx @@ -37,7 +37,7 @@ export default function Layout({ children, isPathRoot }: LayoutProps) { }); const { defaultData, defaultLoading, defaultError } = useDefaultMovies(1); - const { currentState } = useCurrentState({ filter, searchTerm }); + const { currentState, setCurrentState } = useCurrentState({ filter, searchTerm }); const isLoaded = useLoading({ filterLoading, @@ -65,6 +65,9 @@ export default function Layout({ children, isPathRoot }: LayoutProps) { asideOffsetBreakpoint="sm" navbar={