diff --git a/.changeset/cool-pumpkins-confess.md b/.changeset/cool-pumpkins-confess.md new file mode 100644 index 0000000000..22aa89a681 --- /dev/null +++ b/.changeset/cool-pumpkins-confess.md @@ -0,0 +1,5 @@ +--- +"@medusajs/admin-ui": patch +--- + +fix(admin-ui): Make copy and UI on manage locations modal better when no locations diff --git a/packages/admin-ui/ui/src/components/forms/product/variant-inventory-form/variant-stock-form/index.tsx b/packages/admin-ui/ui/src/components/forms/product/variant-inventory-form/variant-stock-form/index.tsx index 3ef8a712ef..f39d69e004 100644 --- a/packages/admin-ui/ui/src/components/forms/product/variant-inventory-form/variant-stock-form/index.tsx +++ b/packages/admin-ui/ui/src/components/forms/product/variant-inventory-form/variant-stock-form/index.tsx @@ -1,7 +1,7 @@ import { Controller, useFieldArray, UseFormReturn } from "react-hook-form" import { nestedForm } from "../../../../../utils/nested-form" import React, { useMemo, useState } from "react" - +import clsx from "clsx" import Accordion from "../../../../organisms/accordion" import BuildingsIcon from "../../../../fundamentals/icons/buildings-icon" import Button from "../../../../fundamentals/button" @@ -342,24 +342,39 @@ const ManageLocationsForm = ({ setSelectedLocations(locationOptions.map((l) => l.id)) } + const locationsAvailable = !!locationOptions.length + return (