From 84fd842f67c1fe865fe4bd294d7b98f3cccee39f Mon Sep 17 00:00:00 2001 From: ledouxm Date: Thu, 11 Apr 2024 18:56:59 +0200 Subject: [PATCH] fix: display right reports in the second tab --- packages/frontend/src/features/ReportList.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/frontend/src/features/ReportList.tsx b/packages/frontend/src/features/ReportList.tsx index b14faa58..f578f84d 100644 --- a/packages/frontend/src/features/ReportList.tsx +++ b/packages/frontend/src/features/ReportList.tsx @@ -32,7 +32,8 @@ export const MyReports = () => { }; export const AllReports = () => { - const allReports = useLiveQuery(db.report.liveMany()); + const user = useUser()!; + const allReports = useLiveQuery(db.report.liveMany({ where: { created_by_id: { not: user.id } } })); if (allReports.error) { console.error(allReports.error);