MCPcopy Create free account
hub / github.com/Shopify/function-examples / loader

Function loader

sample-apps/discounts/app/routes/auth.login/route.jsx:21–28  ·  view source on GitHub ↗
({ request })

Source from the content-addressed store, hash-verified

19export const links = () => [{ rel: "stylesheet", href: polarisStyles }];
20
21export async function loader({ request }) {
22 const errors = loginErrorMessage(await login(request));
23
24 return json({
25 errors,
26 polarisTranslations: require(`@shopify/polaris/locales/en.json`),
27 });
28}
29
30export async function action({ request }) {
31 const errors = loginErrorMessage(await login(request));

Callers

nothing calls this directly

Calls 1

loginErrorMessageFunction · 0.90

Tested by

no test coverage detected