diff --git a/components/Navbar.jsx b/components/Navbar.jsx index 8e29937..4871b9b 100644 --- a/components/Navbar.jsx +++ b/components/Navbar.jsx @@ -93,14 +93,16 @@ const Navbar = () => { > Properties - - Add Property - + {session && ( + + Add Property + + )} @@ -250,14 +252,16 @@ const Navbar = () => { > Properties - - Add Property - + {session && ( + + Add Property + + )} {!session && (
diff --git a/middleware.js b/middleware.js new file mode 100644 index 0000000..67ec4e2 --- /dev/null +++ b/middleware.js @@ -0,0 +1,5 @@ +export { default } from 'next-auth/middleware'; + +export const config = { + matcher: ['/properties/add', '/profile', '/properties/saved', '/messages'], +};