export function buildQueryString(
  path: string,
  params?: ConstructorParameters<typeof URLSearchParams>[0]
) {
  const hasParams = params && Object.keys(params).length > 0
  return `${path}${hasParams ? '?' : ''}${new URLSearchParams(params)}`
}