mirror of
https://github.com/lukevella/rallly.git
synced 2025-06-10 06:31:49 +02:00
📈 Improvements to posthog analytics data (#1189)
This commit is contained in:
parent
278713d57f
commit
587e11de17
10 changed files with 93 additions and 80 deletions
|
@ -3,15 +3,12 @@ import { Badge } from "@rallly/ui/badge";
|
|||
import React from "react";
|
||||
|
||||
import { Trans } from "@/components/trans";
|
||||
import { useUser } from "@/components/user-provider";
|
||||
import { isSelfHosted } from "@/utils/constants";
|
||||
import { trpc } from "@/utils/trpc/client";
|
||||
|
||||
export const useSubscription = () => {
|
||||
const { user } = useUser();
|
||||
|
||||
const { data } = trpc.user.subscription.useQuery(undefined, {
|
||||
enabled: !isSelfHosted && user.isGuest === false,
|
||||
enabled: !isSelfHosted,
|
||||
});
|
||||
|
||||
if (isSelfHosted) {
|
||||
|
@ -20,12 +17,6 @@ export const useSubscription = () => {
|
|||
};
|
||||
}
|
||||
|
||||
if (user.isGuest) {
|
||||
return {
|
||||
active: false,
|
||||
};
|
||||
}
|
||||
|
||||
return data;
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue