@orderly.network/trading-rewards 3.0.1 → 3.0.2

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/dist/index.mjs CHANGED
@@ -1,8 +1,8 @@
1
- import { Flex, cn, Box, Text, Divider, ListView, DataTable, Tooltip, usePagination } from '@orderly.network/ui';
1
+ import { Flex, cn, Box, useScreen, Text, Divider, ListView, DataTable, Tooltip, usePagination } from '@orderly.network/ui';
2
2
  import { useTranslation } from '@orderly.network/i18n';
3
3
  import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
4
4
  import React3, { createContext, useState, useEffect, useMemo, useContext, useCallback } from 'react';
5
- import { useMediaQuery, useTradingRewardsStatus, EpochStatus, TWType, useConfig, useGetClaimed, DistributionId, useAllBrokers, useCurEpochEstimate, useWalletRewardsHistory, useEpochInfo, useWalletConnector, useAccount, useGetEnv, ENVType, useAccountRewardsHistory } from '@orderly.network/hooks';
5
+ import { useTradingRewardsStatus, EpochStatus, TWType, useConfig, useGetClaimed, DistributionId, useAllBrokers, useCurEpochEstimate, useWalletRewardsHistory, useEpochInfo, useWalletConnector, useAccount, useGetEnv, ENVType, useAccountRewardsHistory } from '@orderly.network/hooks';
6
6
  import { useAppContext, useDataTap } from '@orderly.network/react-app';
7
7
  import { AccountStatusEnum, ChainNamespace } from '@orderly.network/types';
8
8
  import { commifyOptional, commify, Decimal, getTimestamp } from '@orderly.network/utils';
@@ -1306,7 +1306,7 @@ var init_rewardsHistory_ui = __esm({
1306
1306
  );
1307
1307
  };
1308
1308
  List = (props) => {
1309
- const isMobile = useMediaQuery("(max-width: 767px)");
1309
+ const { isMobile } = useScreen();
1310
1310
  return isMobile ? /* @__PURE__ */ jsx(
1311
1311
  ListView,
1312
1312
  {
@@ -1741,7 +1741,7 @@ var HomePage = (props) => {
1741
1741
  /* @__PURE__ */ jsx(React3.Suspense, { fallback: null, children: /* @__PURE__ */ jsx(LazyTitleWidget, {}) }),
1742
1742
  /* @__PURE__ */ jsxs(Flex, { className: "oui-flex oui-size-full oui-flex-col oui-gap-4 2xl:oui-flex-row 2xl:oui-items-stretch", children: [
1743
1743
  /* @__PURE__ */ jsx(Box, { className: "oui-w-full 2xl:oui-size-auto 2xl:oui-flex-1", children: /* @__PURE__ */ jsx(React3.Suspense, { fallback: null, children: /* @__PURE__ */ jsx(LazyCurEpochWidget, {}) }) }),
1744
- /* @__PURE__ */ jsxs(Flex, { className: "oui-flex oui-w-full oui-flex-col oui-gap-4 lg:oui-flex-row 2xl:oui-flex-1 2xl:oui-flex-col", children: [
1744
+ /* @__PURE__ */ jsxs(Flex, { className: "oui-flex oui-w-full oui-flex-col oui-gap-4 xl:oui-flex-row 2xl:oui-flex-1 2xl:oui-flex-col", children: [
1745
1745
  /* @__PURE__ */ jsx(React3.Suspense, { fallback: null, children: /* @__PURE__ */ jsx(LazyAvailableToClaimWidget, {}) }),
1746
1746
  /* @__PURE__ */ jsx(StakeBooster2, {})
1747
1747
  ] })
@@ -1835,7 +1835,7 @@ var useTradingRewardsLayoutScript = (props) => {
1835
1835
  }
1836
1836
  ];
1837
1837
  }, [t]);
1838
- const hideSideBar = useMediaQuery("(max-width: 768px)");
1838
+ const { isMobile: hideSideBar } = useScreen();
1839
1839
  return {
1840
1840
  items,
1841
1841
  current,