Skip to content

Commit

Permalink
Update page.js
Browse files Browse the repository at this point in the history
  • Loading branch information
ElyasMehraein committed Apr 26, 2024
1 parent ab1e5c5 commit cae11e4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/all/page.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@ import { notFound } from "next/navigation";
export default async function page() {
try {
connectToDB();
const businesses =JSON.parse(JSON.stringify( await BusinessModel.find({}, "businessName bio businessBrand isAvatar")));
const businesses = JSON.parse(JSON.stringify(await BusinessModel.find({}, "businessName bio businessBrand isAvatar")));


return (
<AllBusinesses businesses={businesses} />
);
} catch (err) {
console.error('Error fetching businesses:', err);
return notFound();
// return notFound();
}
}

0 comments on commit cae11e4

Please sign in to comment.