general: snapshot

This commit is contained in:
k
2024-07-03 20:40:35 +02:00
parent b7e8cbea20
commit 069311dcf3
24 changed files with 407 additions and 312 deletions

View File

@@ -4,11 +4,9 @@ export { averages } from "./consts/averages";
export function createScaleDatasets<Scale extends ResourceScale>({
scale,
setActiveResources,
groupedKeysToURLPath,
}: {
scale: Scale;
setActiveResources: Setter<Set<ResourceDataset<any, any>>>;
groupedKeysToURLPath: GroupedKeysToURLPath[Scale];
}) {
type Key = keyof typeof groupedKeysToURLPath;
@@ -23,7 +21,6 @@ export function createScaleDatasets<Scale extends ResourceScale>({
datasets[key as unknown as Exclude<Key, "ohlc">] = createResourceDataset({
scale,
path: groupedKeysToURLPath[key as Key] as any,
setActiveResources,
});
}
}
@@ -31,7 +28,6 @@ export function createScaleDatasets<Scale extends ResourceScale>({
const price = createResourceDataset<Scale, OHLC>({
scale,
path: `/${scale}-to-ohlc`,
setActiveResources,
});
Object.assign(datasets, { price });