The complete open source platform to run your entire marketplace. Storefront, vendor panel, admin console, and integrations in one enterprise-grade platform you own.
TypeScript b2b-marketplacecomposable-commerceecommerceenterpriseheadless-commercemarketplacemedusamedusajsmulti-vendortypescript
import { useParams } from "react-router-dom"
import { RouteFocusModal } from "../../../components/modals"
import { useStockLocation } from "../../../hooks/api/stock-locations"
import { LocationEditFulfillmentProvidersForm } from "./components/edit-fulfillment-providers-form"
export const LocationFulfillmentProviders = () => {
const { location_id } = useParams()
const { stock_location, isPending, isError, error } = useStockLocation(
location_id!,
{ fields: "id,*fulfillment_providers" }
)
const ready = !isPending && !!stock_location
if (isError) {
throw error
}
return (
<RouteFocusModal data-testid="location-fulfillment-providers-modal">
{ready && (
<LocationEditFulfillmentProvidersForm location={stock_location} />
)}
</RouteFocusModal>
)
}