import { useAppSelector } from "@/store/hooks";
import { formatPrice as _formatPrice } from "@/utils/marketplace";

export function useFormatPrice() {
  const currencyCode = useAppSelector((s) => s.generalSetting.currencyCode);
  return (amount: number) => _formatPrice(amount, currencyCode);
}
