From e1c47745301067e5f4b54de8a52d6836ea880519 Mon Sep 17 00:00:00 2001 From: Ndibe Raymond Olisaemeka Date: Mon, 4 Mar 2024 19:51:46 +0100 Subject: [PATCH] fix navbar bug (#1123) Co-authored-by: Ndibe Raymond Olisaemeka --- zubhub_frontend/zubhub/src/views/PageWrapper.jsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/zubhub_frontend/zubhub/src/views/PageWrapper.jsx b/zubhub_frontend/zubhub/src/views/PageWrapper.jsx index 7c5988b9..728dbf2a 100644 --- a/zubhub_frontend/zubhub/src/views/PageWrapper.jsx +++ b/zubhub_frontend/zubhub/src/views/PageWrapper.jsx @@ -114,14 +114,14 @@ function PageWrapper(props) { // useLocation in every component that needs them. // React.cloneElement makes our code brittle: see https://react.dev/reference/react/cloneElement const childrenRenderer = () => - React.Children.map(props.children, child => React.cloneElement(child, { ...routeProps, ...props })); + React.Children.map(props.children, child => React.cloneElement(child, { ...props, ...routeProps })); return ( <> - + {props.auth?.token ? {loading ? : childrenRenderer()} : null}