@tradejs/app 3.1.29-beta.272 → 3.1.29-beta.273

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tradejs/app",
3
- "version": "3.1.29-beta.272",
3
+ "version": "3.1.29-beta.273",
4
4
  "description": "Installable Next.js UI for the TradeJS TypeScript framework: dashboards, backtests, charts, and runtime data.",
5
5
  "keywords": [
6
6
  "tradejs",
@@ -59,11 +59,11 @@
59
59
  "@emotion/react": "^11.14.0",
60
60
  "@modelcontextprotocol/sdk": "^1.32.1",
61
61
  "@node-oauth/oauth2-server": "^5.3.0",
62
- "@tradejs/core": "^3.1.29-beta.272",
63
- "@tradejs/indicators": "^3.1.29-beta.272",
64
- "@tradejs/infra": "^3.1.29-beta.272",
65
- "@tradejs/node": "^3.1.29-beta.272",
66
- "@tradejs/types": "^3.1.29-beta.272",
62
+ "@tradejs/core": "^3.1.29-beta.273",
63
+ "@tradejs/indicators": "^3.1.29-beta.273",
64
+ "@tradejs/infra": "^3.1.29-beta.273",
65
+ "@tradejs/node": "^3.1.29-beta.273",
66
+ "@tradejs/types": "^3.1.29-beta.273",
67
67
  "@types/bcryptjs": "2.4.6",
68
68
  "@types/lodash": "4.17.24",
69
69
  "@types/node": "24.13.3",
@@ -14,7 +14,6 @@ export const HOURS_OPTIONS = [
14
14
  { label: 'Last 90d', value: '2160' },
15
15
  ];
16
16
 
17
- export const INTERVAL_OPTIONS = ['15m', '1h'] as const;
18
17
  export const FIXED_SYMBOLS = ['BTCUSDT', 'ETHUSDT'] as const;
19
18
 
20
19
  const DERIVATIVES_TO_KLINE_INTERVAL = {
@@ -1,21 +1,13 @@
1
1
  'use client';
2
2
 
3
3
  import { Box, ClientOnly, Flex, Heading } from '@chakra-ui/react';
4
- import { Segment, Select } from '#ui';
5
- import { HOURS_OPTIONS, INTERVAL_OPTIONS } from './derivativesDashboardConfig';
4
+ import { Select } from '#ui';
5
+ import { HOURS_OPTIONS } from './derivativesDashboardConfig';
6
6
  import { DerivativesDashboardView } from './DerivativesDashboardView';
7
- import type { DerivativesInterval } from './derivativesViewModel';
8
7
  import { useDerivativesDashboard } from './useDerivativesDashboard';
9
8
 
10
9
  const DerivativesPage = () => {
11
- const {
12
- hours,
13
- setHours,
14
- selectedInterval,
15
- setSelectedInterval,
16
- chartWindow,
17
- dashboard,
18
- } = useDerivativesDashboard();
10
+ const { hours, setHours, chartWindow, dashboard } = useDerivativesDashboard();
19
11
 
20
12
  return (
21
13
  <ClientOnly>
@@ -38,19 +30,6 @@ const DerivativesPage = () => {
38
30
  items={HOURS_OPTIONS}
39
31
  width="180px"
40
32
  />
41
- <Segment
42
- defaultValue={selectedInterval}
43
- value={selectedInterval}
44
- onChange={(value) =>
45
- setSelectedInterval(
46
- (value as DerivativesInterval | null) ?? '1h',
47
- )
48
- }
49
- items={INTERVAL_OPTIONS.map((value) => ({
50
- label: value,
51
- value,
52
- }))}
53
- />
54
33
  </Flex>
55
34
  </Flex>
56
35
  <DerivativesDashboardView
@@ -13,10 +13,10 @@ import {
13
13
  type SummaryResponse,
14
14
  } from './derivativesViewModel';
15
15
 
16
+ const selectedInterval: DerivativesInterval = '15m';
17
+
16
18
  export const useDerivativesDashboard = () => {
17
19
  const [hours, setHours] = useState('24');
18
- const [selectedInterval, setSelectedInterval] =
19
- useState<DerivativesInterval>('1h');
20
20
  const [summary, setSummary] = useState<SummaryResponse | null>(null);
21
21
  const [detailsBySymbol, setDetailsBySymbol] = useState<
22
22
  Record<string, DetailRow[]>
@@ -69,7 +69,7 @@ export const useDerivativesDashboard = () => {
69
69
  return () => {
70
70
  if (requestRevision.current === revision) requestRevision.current += 1;
71
71
  };
72
- }, [hours, selectedInterval]);
72
+ }, [hours]);
73
73
 
74
74
  const dashboard = useMemo(
75
75
  () =>
@@ -84,21 +84,12 @@ export const useDerivativesDashboard = () => {
84
84
  summaryError: error,
85
85
  detailError: error,
86
86
  }),
87
- [
88
- detailsBySymbol,
89
- error,
90
- loading,
91
- pricesBySymbol,
92
- selectedInterval,
93
- summary,
94
- ],
87
+ [detailsBySymbol, error, loading, pricesBySymbol, summary],
95
88
  );
96
89
 
97
90
  return {
98
91
  hours,
99
92
  setHours,
100
- selectedInterval,
101
- setSelectedInterval,
102
93
  chartWindow,
103
94
  dashboard,
104
95
  };