import dayjs from "dayjs"; import { TRIAL_LIMIT_DAYS } from "@lib/config/constants"; import { useLocale } from "@lib/hooks/useLocale"; import { useMeQuery } from "@components/Shell"; import Button from "@components/ui/Button"; const TrialBanner = () => { const { t } = useLocale(); const query = useMeQuery(); const user = query.data; if (!user || user.plan !== "TRIAL") return null; const trialDaysLeft = user.trialEndsAt ? dayjs(user.trialEndsAt).add(1, "day").diff(dayjs(), "day") : dayjs(user.createdDate) .add(TRIAL_LIMIT_DAYS + 1, "day") .diff(dayjs(), "day"); return (