mirror of
https://github.com/getpaseo/paseo.git
synced 2026-10-23 17:52:49 +00:00
* fix(usage): derive window names and unify pin selection Quota slots do not identify a period. Derive numeric windows and IDs from reported duration and quota scope; keep unknown lengths neutral. Resolve source defaults and explicit pins through one model, with a persisted empty selection distinct from defaults. * fix(plugins): declare the duration helper host requirement * fix(usage): verify persisted selections at the storage boundary
21 lines
603 B
TypeScript
21 lines
603 B
TypeScript
import { usageCopy } from "./copy";
|
|
import { useUsagePreferences } from "./display";
|
|
import { useHostUsage } from "./queries";
|
|
import { UsageSection } from "./usage-section";
|
|
|
|
/** A host's usage reports, for its settings page. */
|
|
export function HostUsageSection({ serverId }: { serverId: string }) {
|
|
const { view, refresh } = useHostUsage(serverId);
|
|
const { display } = useUsagePreferences(serverId);
|
|
return (
|
|
<UsageSection
|
|
serverId={serverId}
|
|
title={usageCopy.planUsage}
|
|
view={view}
|
|
display={display}
|
|
onRefresh={refresh}
|
|
testID="usage-card"
|
|
/>
|
|
);
|
|
}
|