Refactor subscription logic and replace quill-sense references with ritor equivalents
- Updated `getCurrentSubscription` and related functions to reflect terminology changes. - Adjusted subscription levels and access checks to streamline logic. - Removed unused cases in `getSubLevel` and optimized conditionals for clarity.
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import {GuideTour, Subscription, UserProps} from "@/lib/types/user";
|
||||
import {SessionProps} from "@/lib/types/session";
|
||||
|
||||
export function getCurrentSubscription(user: UserProps | null, type: "quill-sense" | "use-your-keys" | "quill-trial"): Subscription | null {
|
||||
export function getCurrentSubscription(user: UserProps | null, type: "ritor-subscription" | "use-your-keys" | "ritor-trial"): Subscription | null {
|
||||
if (!user || !user.subscription || user.subscription.length === 0) {
|
||||
return null;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user