UNPKG

@rsc-labs/medusa-documents

Version:
30 lines (29 loc) 1.17 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); const jsx_runtime_1 = require("react/jsx-runtime"); /* * Copyright 2024 RSC-Labs, https://rsoftcon.com/ * * MIT License * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ const medusa_react_1 = require("medusa-react"); const material_1 = require("@mui/material"); const PackingSlipNumber = ({ packingSlipId }) => { const { data, isLoading } = (0, medusa_react_1.useAdminCustomQuery)("/packing-slip", [''], { id: packingSlipId }); if (isLoading) { return ((0, jsx_runtime_1.jsx)(material_1.CircularProgress, { size: 8 })); } ; if (data && data.packingSlip) { return ((0, jsx_runtime_1.jsx)("p", { className: "text-grey-90 group-hover:text-violet-60 pl-2", children: `Packing slip: ${data.packingSlip.display_number}` })); } }; exports.default = PackingSlipNumber;