OpenPanel is an open-source web and product analytics platform, an open-source alternative to Mixpanel with optional self-hosting.
fix(dashboard): groups and group members lists show pages after the first
Carl-Gerhard Lindesvärd6e0b5ec993a6
diff --git a/apps/start/src/routes/_app.$organizationId.$projectId.groups.tsx b/apps/start/src/routes/_app.$organizationId.$projectId.groups.tsxindex f685db876..7a20307df 100644--- a/apps/start/src/routes/_app.$organizationId.$projectId.groups.tsx+++ b/apps/start/src/routes/_app.$organizationId.$projectId.groups.tsx@@ -49,7 +49,7 @@ function Component() {search: debouncedSearch || undefined,type: typeFilter || undefined,take: PAGE_SIZE,- cursor: (page - 1) * PAGE_SIZE,+ cursor: page - 1,},{ placeholderData: keepPreviousData })diff --git a/apps/start/src/routes/_app.$organizationId.$projectId.groups_.$groupId._tabs.members.tsx b/apps/start/src/routes/_app.$organizationId.$projectId.groups_.$groupId._tabs.members.tsxindex 2023949a0..a67dd0303 100644--- a/apps/start/src/routes/_app.$organizationId.$projectId.groups_.$groupId._tabs.members.tsx+++ b/apps/start/src/routes/_app.$organizationId.$projectId.groups_.$groupId._tabs.members.tsx@@ -6,6 +6,8 @@ import { useSearchQueryState } from '@/hooks/use-search-query-state';import { useTRPC } from '@/integrations/trpc/react';import { createProjectTitle } from '@/utils/title';+const PAGE_SIZE = 50;+export const Route = createFileRoute('/_app/$organizationId/$projectId/groups_/$groupId/_tabs/members')({@@ -19,14 +21,14 @@ function Component() {const { projectId, groupId } = Route.useParams();const trpc = useTRPC();const { debouncedSearch } = useSearchQueryState();- const { page } = useDataTablePagination(50);+ const { page } = useDataTablePagination(PAGE_SIZE);const query = useQuery({...trpc.group.listProfiles.queryOptions({projectId,groupId,- cursor: (page - 1) * 50,- take: 50,+ cursor: page - 1,+ take: PAGE_SIZE,search: debouncedSearch || undefined,}),placeholderData: keepPreviousData,@@ -34,7 +36,7 @@ function Component() {return (<ProfilesTable- pageSize={50}+ pageSize={PAGE_SIZE}query={query as Parameters<typeof ProfilesTable>[0]['query']}type="profiles"/>