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

Function App

sample-apps/discounts/app/routes/app.jsx:24–40  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

22}
23
24export default function App() {
25 const { apiKey } = useLoaderData();
26
27 return (
28 <AppProvider isEmbeddedApp apiKey={apiKey}>
29 <DiscountProvider>
30 <ui-nav-menu>
31 <Link to="/app" rel="home">
32 Home
33 </Link>
34 <Link to="/app/additional">Additional page</Link>
35 </ui-nav-menu>
36 <Outlet />
37 </DiscountProvider>
38 </AppProvider>
39 );
40}
41
42// Shopify needs Remix to catch some thrown responses, so that their headers are included in the response.
43export function ErrorBoundary() {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected