-
User
-
User ID
-
Email
+ return (
+
+
+
User
+
User ID
+
Email
+
+
+ {[...Array(3)].map((_, index) => (
+
+
-
- {[...Array(3)].map((_, index) => (
-
- ))}
+
-
- );
+
+
+ ))}
+
+
+ );
}
diff --git a/apps/web/app/environments/[environmentId]/people/page.tsx b/apps/web/app/environments/[environmentId]/people/page.tsx
index 1d23d93cdb..b7800835d5 100644
--- a/apps/web/app/environments/[environmentId]/people/page.tsx
+++ b/apps/web/app/environments/[environmentId]/people/page.tsx
@@ -9,7 +9,7 @@ const getAttributeValue = (person: TransformPersonOutput, attributeName: string)
person.attributes[attributeName]?.toString();
export default async function PeoplePage({ params }) {
- const people = await getPeople();
+ const people = await getPeople(params.environmentId);
return (
<>
diff --git a/packages/lib/services/person.ts b/packages/lib/services/person.ts
index 438959d0be..2f9599de71 100644
--- a/packages/lib/services/person.ts
+++ b/packages/lib/services/person.ts
@@ -70,9 +70,12 @@ export const getPerson = async (personId: string): Promise
=> {
}
};
-export const getPeople = cache(async (): Promise => {
+export const getPeople = cache(async (environmentId: string): Promise => {
try {
const personsPrisma = await prisma.person.findMany({
+ where: {
+ environmentId: environmentId,
+ },
select: {
id: true,
attributes: {