Query for reviews and users
parent
d6e9bfbe9f
commit
ee9bde6d5b
|
@ -84,7 +84,20 @@ export const getStaticProps = async (ctx: GetStaticPropsContext) => {
|
|||
|
||||
const app = await prisma.app.findUnique({
|
||||
where: { slug: ctx.params.slug },
|
||||
include: {
|
||||
reviews: {
|
||||
select: {
|
||||
user: {
|
||||
select: {
|
||||
name: true,
|
||||
avatar: true,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
});
|
||||
console.log("🚀 ~ file: index.tsx ~ line 100 ~ getStaticProps ~ app", app.reviews);
|
||||
|
||||
if (!app) return { notFound: true };
|
||||
|
||||
|
|
Loading…
Reference in New Issue