Rust discount function (one automatic discount evaluating all offers in priority order, parity with the Odoo engine), React Router admin with Polaris, theme app extension and app proxy pages, webhooks incl. GDPR, managed-pricing limits, and a Docker Compose stack (Postgres + Caddy HTTPS) for a single VPS. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
17 lines
556 B
TypeScript
17 lines
556 B
TypeScript
import type { LoginError } from "@shopify/shopify-app-react-router/server";
|
|
import { LoginErrorType } from "@shopify/shopify-app-react-router/server";
|
|
|
|
interface LoginErrorMessage {
|
|
shop?: string;
|
|
}
|
|
|
|
export function loginErrorMessage(loginErrors: LoginError): LoginErrorMessage {
|
|
if (loginErrors?.shop === LoginErrorType.MissingShop) {
|
|
return { shop: "Please enter your shop domain to log in" };
|
|
} else if (loginErrors?.shop === LoginErrorType.InvalidShop) {
|
|
return { shop: "Please enter a valid shop domain to log in" };
|
|
}
|
|
|
|
return {};
|
|
}
|