Skip to content

The complete open source platform to run your entire marketplace. Storefront, vendor panel, admin console, and integrations in one enterprise-grade platform you own.

498 B
Raw Blame
import { useCan } from "@mercurjs/dashboard-shared"

import { useSeller } from "../../../../hooks/api/sellers"
import { OfferStoreSidebar } from "./offer-store-sidebar"

export const OfferDetailStoreSection = ({
  sellerId,
}: {
  sellerId?: string
}) => {
  const canViewSellers = useCan("sellers")
  const { seller } = useSeller(sellerId ?? "", undefined, {
    enabled: !!sellerId && canViewSellers,
  })

  if (!sellerId) {
    return null
  }

  return <OfferStoreSidebar seller={seller} />
}