wealth/docs/pages/wall-street-plaza/subscriptions.md

4.0 KiB
Raw Blame History

Subscriptions

/subscriptions · apps/wall-street-plaza/src/app/(panel)/subscriptions/page.tsx · Type: account (back office) · Layout: layout-panel.md

Field Value
Robots noindex (root layout metadata, src/configs/seo.ts)
Status 200; an unknown subscription in the URL shows the not-found state inside the side sheet, with 200
loading.tsx (panel)/subscriptions/loading.tsx
First flush none
Canonical none
H1 subscriptions:list.title from i18n, in PageHeader
JSON-LD none
Scripts none

Sections

Section Data HTML JS Index Notes
PageHeader, with the H1 config first flush none no
↳ SubscriptionsToolbar — first flush hydrate no the search by username, phone or tracking number in the URL, and «اعطای دسترسی», a link that opens the grant dialog through the URL; in a <Suspense> with no fallback
SubscriptionList — skeleton hydrate no AdminGuard › <Suspense>; both fallbacks are ListSkeleton (the table preset)
↳ Filter ChipGroup — skeleton hydrate no the filters in the URL
↳ SubscriptionRows query skeleton hydrate no useSuspenseQuery behind its own <Suspense> and a PartBoundary keyed by search, filters and page; a row's link opens the detail through the URL
SubscriptionDetailSheet query none hydrate no a side Sheet with the subscription; extend and refund dialogs inside
GrantAccessDialog query none hydrate no mounted only while open; the subscriber and the channel are looked up as they're typed (useQuery)

Notes

  • Debt: the guard's fallback (subscriptions/page.tsx:19, ListSkeleton) has no row for the filter chips, so the table moves down when the admin is known; and subscriptions/loading.tsx:10 draws the header without the toolbar.
  • Debt: use-grant-access-dialog.ts:96 reads Date.now() in a state initializer during render, and the detail mapper computes the days left from Date.now() (repositories/subscriptions/mappers.ts:81), so a cached detail can show a stale count. Read the time from a shared clock in the part that shows it.