MCPcopy
hub / github.com/loggerhead/json4u / PremiumStatus

Function PremiumStatus

src/components/AccountPanel.tsx:73–91  ·  view source on GitHub ↗
({ activeOrder }: PremiumStatusProps)

Source from the content-addressed store, hash-verified

71}
72
73function PremiumStatus({ activeOrder }: PremiumStatusProps) {
74 const t = useTranslations("Pricing");
75 const status = activeOrder?.status;
76 const renewsAt = activeOrder?.renews_at;
77 const endsAt = activeOrder?.ends_at;
78 const text: MessageKey = status === "active" ? "renew_display_prefix" : "expired_display_prefix";
79 const date = status === "active" ? renewsAt : endsAt;
80
81 if (!activeOrder || !date) {
82 return null;
83 }
84
85 return (
86 <span className="flex gap-1">
87 <Typography affects="muted">{t(text)}</Typography>
88 <Typography>{dateToYYYYMMDD(date)}</Typography>
89 </span>
90 );
91}

Callers

nothing calls this directly

Calls 2

dateToYYYYMMDDFunction · 0.90
tFunction · 0.50

Tested by

no test coverage detected