Update admin layout and pages (#976)

This commit is contained in:
Luke Vella 2024-01-13 15:09:48 +07:00 committed by GitHub
parent 0ba7e9ce91
commit a1bac0c986
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
81 changed files with 2053 additions and 1260 deletions

View file

@ -44,9 +44,9 @@ export const IfSubscribed = ({ children }: React.PropsWithChildren) => {
};
export const IfFreeUser = ({ children }: React.PropsWithChildren) => {
const plan = usePlan();
const subscription = useSubscription();
return plan === "free" ? <>{children}</> : null;
return subscription?.active === false ? <>{children}</> : null;
};
export const Plan = () => {