diff --git a/packages/frontend/src/components/ui/navbar/popovers/preferences/index.tsx b/packages/frontend/src/components/ui/navbar/popovers/preferences/index.tsx index 3d98d071b..9d8f61e1c 100644 --- a/packages/frontend/src/components/ui/navbar/popovers/preferences/index.tsx +++ b/packages/frontend/src/components/ui/navbar/popovers/preferences/index.tsx @@ -15,6 +15,8 @@ import { } from "@carrot-kpi/react"; import { useTranslation } from "react-i18next"; import { InfoPopover } from "../../../../info-popover"; +import { ChainId, SUBGRAPH_URL } from "@carrot-kpi/sdk"; +import { useChainId } from "wagmi"; interface PreferencesPopoverProps { open: boolean; @@ -27,7 +29,7 @@ export const PreferencesPopover = forwardRef< PreferencesPopoverProps >(function PreferencesPopover({ open, anchor }, ref) { const { t } = useTranslation(); - + const chainId = useChainId(); const preferDecentralization = usePreferDecentralization(); const setPreferDecentralization = useSetPreferDecentralization(); @@ -108,23 +110,27 @@ export const PreferencesPopover = forwardRef< /> -
-
- {t("preferences.decentralization")} - - - {t("preferences.decentralization.info")} + {!!SUBGRAPH_URL[chainId as ChainId] && ( +
+
+ + {t("preferences.decentralization")} - + + + {t("preferences.decentralization.info")} + + +
+
- -
+ )} {__STAGING_MODE__ && (
diff --git a/packages/ui/.size-limit.js b/packages/ui/.size-limit.js index 5b15f26e6..f87a3d3e2 100644 --- a/packages/ui/.size-limit.js +++ b/packages/ui/.size-limit.js @@ -2,11 +2,11 @@ const path = require("path"); module.exports = [ { path: path.join(path.resolve("./"), "./dist/es/**/*.mjs"), - limit: "700 KB", + limit: "750 KB", }, { path: path.join(path.resolve("./"), "./dist/cjs/**/*.cjs"), - limit: "700 KB", + limit: "750 KB", }, { path:path.join(path.resolve("./"), "./dist/styles.css"),