import { LoginErrorType } from "@shopify/shopify-app-react-router/server";

export function loginErrorMessage(loginErrors) {
  if (loginErrors?.shop === LoginErrorType.MissingShop) {
    return { shop: "Open the app from Shopify Admin to continue authentication.", };
  } else if (loginErrors?.shop === LoginErrorType.InvalidShop) {
    return { shop: "Open the app from Shopify Admin to continue authentication.", };
  }

  return {};
}
