Skip to content

OpenPanel is an open-source web and product analytics platform, an open-source alternative to Mixpanel with optional self-hosting.

349 B
Raw Blame
import { useQuery } from '@tanstack/react-query';
import { useTRPC } from '@/integrations/trpc/react';

export function useProfileValues(projectId: string, property: string) {
  const trpc = useTRPC();
  const query = useQuery(
    trpc.profile.values.queryOptions({
      projectId,
      property,
    })
  );
  return query.data?.values ?? [];
}