diff --git a/.changeset/funny-ties-tan.md b/.changeset/funny-ties-tan.md new file mode 100644 index 0000000000..ffd1309efa --- /dev/null +++ b/.changeset/funny-ties-tan.md @@ -0,0 +1,5 @@ +--- +"@medusajs/admin-ui": patch +--- + +feat(admin-ui): always show list of currencies in currency overview diff --git a/packages/admin-ui/ui/src/domain/settings/currencies/components/currency-tax-setting.tsx b/packages/admin-ui/ui/src/domain/settings/currencies/components/currency-tax-setting.tsx index 9081a22b52..5b7ddea465 100644 --- a/packages/admin-ui/ui/src/domain/settings/currencies/components/currency-tax-setting.tsx +++ b/packages/admin-ui/ui/src/domain/settings/currencies/components/currency-tax-setting.tsx @@ -1,12 +1,14 @@ -import { Currency } from "@medusajs/medusa" -import { useQueryClient } from "@tanstack/react-query" -import { adminStoreKeys, useAdminUpdateCurrency } from "medusa-react" -import { useEffect } from "react" import { Controller, useForm } from "react-hook-form" -import Switch from "../../../../components/atoms/switch" +import { adminStoreKeys, useAdminUpdateCurrency } from "medusa-react" + import CoinsIcon from "../../../../components/fundamentals/icons/coins-icon" -import useNotification from "../../../../hooks/use-notification" +import { Currency } from "@medusajs/medusa" +import FeatureToggle from "../../../../components/fundamentals/feature-toggle" +import Switch from "../../../../components/atoms/switch" import { getErrorMessage } from "../../../../utils/error-messages" +import { useEffect } from "react" +import useNotification from "../../../../hooks/use-notification" +import { useQueryClient } from "@tanstack/react-query" type CurrencyTaxSettingFormType = { includes_tax: boolean @@ -70,21 +72,23 @@ const CurrencyTaxSetting = ({ currency, isDefault }: Props) => { )} - { - return ( - { - onChange(data) - onSubmit() - }} - /> - ) - }} - /> + + { + return ( + { + onChange(data) + onSubmit() + }} + /> + ) + }} + /> + ) diff --git a/packages/admin-ui/ui/src/domain/settings/currencies/index.tsx b/packages/admin-ui/ui/src/domain/settings/currencies/index.tsx index b77ef259d3..99c0fc96c6 100644 --- a/packages/admin-ui/ui/src/domain/settings/currencies/index.tsx +++ b/packages/admin-ui/ui/src/domain/settings/currencies/index.tsx @@ -1,16 +1,16 @@ -import { useAdminStore } from "medusa-react" -import { useNavigate } from "react-router-dom" import BackButton from "../../../components/atoms/back-button" -import Spinner from "../../../components/atoms/spinner" -import Tooltip from "../../../components/atoms/tooltip" +import CurrencyTaxSetting from "./components/currency-tax-setting" +import DefaultStoreCurrency from "./components/default-store-currency" import FeatureToggle from "../../../components/fundamentals/feature-toggle" import JSONView from "../../../components/molecules/json-view" import Section from "../../../components/organisms/section" -import { useAnalytics } from "../../../providers/analytics-provider" -import { getErrorStatus } from "../../../utils/get-error-status" -import CurrencyTaxSetting from "./components/currency-tax-setting" -import DefaultStoreCurrency from "./components/default-store-currency" +import Spinner from "../../../components/atoms/spinner" import StoreCurrencies from "./components/store-currencies" +import Tooltip from "../../../components/atoms/tooltip" +import { getErrorStatus } from "../../../utils/get-error-status" +import { useAdminStore } from "medusa-react" +import { useAnalytics } from "../../../providers/analytics-provider" +import { useNavigate } from "react-router-dom" const CurrencySettings = () => { const navigate = useNavigate() @@ -77,10 +77,10 @@ const CurrencySettings = () => {
- -
-
-

Currency

+
+
+

Currency

+ { >

Tax Incl. Prices

-
-
- {store.currencies - .sort((a, b) => { - return a.code > b.code ? 1 : -1 - }) - .map((c, index) => { - return ( - - ) - })} -
+
- +
+ {store.currencies + .sort((a, b) => { + return a.code > b.code ? 1 : -1 + }) + .map((c, index) => { + return ( + + ) + })} +
+