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}