Bootstraps from Shopify's official shopify-app-template-remix (cloned directly rather than via `shopify app init`, which requires an interactive Partner login unavailable in this session): - Prisma (SQLite dev / Postgres-ready) with baseline Session model + migration - Vitest configured for unit tests, Playwright configured for E2E - Redis client + BullMQ worker skeleton (app/lib/redis.server.ts, jobs/worker.ts) - shopify.app.toml: minimal scopes, GDPR + orders webhooks wired (stub handlers), app proxy config for the future storefront widget - Stripped template-repo-only meta files (CLA, issue templates, demo product page) and replaced CI with a lint+typecheck+test workflow - Bumped @shopify/shopify-app-session-storage-prisma to resolve a duplicate @shopify/shopify-api install that broke typecheck - Dropped the Jest-only ESLint config (template default) since the project standardizes on Vitest per IMPLEMENTATION_PLAN.md Verified: npm install, lint, typecheck, unit tests, prisma migrate dev, and npm run build all pass on Node 22 LTS. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
37 lines
1.2 KiB
TypeScript
37 lines
1.2 KiB
TypeScript
import type { LoaderFunctionArgs } from "@remix-run/node";
|
|
import { Page, Layout, Text, Card, BlockStack, EmptyState } from "@shopify/polaris";
|
|
import { TitleBar } from "@shopify/app-bridge-react";
|
|
import { authenticate } from "../shopify.server";
|
|
|
|
export const loader = async ({ request }: LoaderFunctionArgs) => {
|
|
await authenticate.admin(request);
|
|
|
|
return null;
|
|
};
|
|
|
|
export default function Index() {
|
|
return (
|
|
<Page>
|
|
<TitleBar title="Delivery Date & Time" />
|
|
<BlockStack gap="500">
|
|
<Layout>
|
|
<Layout.Section>
|
|
<Card>
|
|
<EmptyState
|
|
heading="No locations configured yet"
|
|
action={{ content: "Add a location", url: "/app/locations" }}
|
|
image="https://cdn.shopify.com/s/files/1/0757/9955/files/empty-state.svg"
|
|
>
|
|
<Text as="p" variant="bodyMd">
|
|
Set up a fulfillment location and its weekly slots to start
|
|
taking scheduled Shipping, Local Delivery, or Pickup orders.
|
|
</Text>
|
|
</EmptyState>
|
|
</Card>
|
|
</Layout.Section>
|
|
</Layout>
|
|
</BlockStack>
|
|
</Page>
|
|
);
|
|
}
|