- /auth/login no longer asks for a myshopify domain (App Store 2.3.1). With ?shop= it still hands off to OAuth; otherwise it points to Shopify. - Billing API charges are test charges outside production and on partner development stores (shop.plan.partnerDevelopment), so reviewers can pick a paid plan. Real shops are charged as before. - SCREENCAST.md matches the recording. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
27 lines
974 B
TypeScript
27 lines
974 B
TypeScript
import type { LoaderFunctionArgs } from "react-router";
|
|
import { login } from "../shopify.server";
|
|
|
|
/**
|
|
* Datewise is installed and opened from Shopify only (App Store requirement 2.3.1), so there is no
|
|
* shop-domain form here. When Shopify sends ?shop=, hand off to OAuth; otherwise explain where to go.
|
|
*/
|
|
export const loader = async ({ request }: LoaderFunctionArgs) => {
|
|
if (new URL(request.url).searchParams.get("shop")) {
|
|
const res = await login(request);
|
|
if (res instanceof Response) throw res;
|
|
}
|
|
return null;
|
|
};
|
|
|
|
export default function Login() {
|
|
return (
|
|
<main style={{ maxWidth: 480, margin: "10vh auto", padding: 16, fontFamily: "system-ui, sans-serif", lineHeight: 1.5 }}>
|
|
<h1>Open Datewise from Shopify</h1>
|
|
<p>
|
|
Datewise runs inside your Shopify admin. Install it from the Shopify App Store, or open it from
|
|
<strong> Apps</strong> in your Shopify admin if it's already installed.
|
|
</p>
|
|
</main>
|
|
);
|
|
}
|