Skip to content

Commit d87fb9c

Browse files
Merge pull request #45 from Shopify/fio-add-new-ab-apis
[Do not merge] Update the template with recommended App Bridge APIs
2 parents 12f09a2 + 3e4a583 commit d87fb9c

3 files changed

Lines changed: 10 additions & 15 deletions

File tree

app/routes/app._index.tsx

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -104,12 +104,10 @@ export default function Index() {
104104
const generateProduct = () => fetcher.submit({}, { method: "POST" });
105105

106106
return (
107-
<s-page>
108-
<ui-title-bar title="React Router app template">
109-
<button variant="primary" onClick={generateProduct}>
110-
Generate a product
111-
</button>
112-
</ui-title-bar>
107+
<s-page heading="React Router app template">
108+
<s-button slot="primary-action" onClick={generateProduct}>
109+
Generate a product
110+
</s-button>
113111

114112
<s-section heading="Congrats on creating a new Shopify app 🎉">
115113
<s-paragraph>

app/routes/app.additional.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
export default function AdditionalPage() {
22
return (
3-
<s-page>
4-
<ui-title-bar title="Additional page"></ui-title-bar>
3+
<s-page heading="Additional page">
54
<s-section heading="Multiple pages">
65
<s-paragraph>
76
The app template comes with an additional page which demonstrates how

app/routes/app.tsx

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import type { HeadersFunction, LoaderFunctionArgs } from "react-router";
2-
import { Link, Outlet, useLoaderData, useRouteError } from "react-router";
2+
import { Outlet, useLoaderData, useRouteError } from "react-router";
33
import { boundary } from "@shopify/shopify-app-react-router/server";
44
import { AppProvider } from "@shopify/shopify-app-react-router/react";
55

@@ -17,12 +17,10 @@ export default function App() {
1717

1818
return (
1919
<AppProvider embedded apiKey={apiKey}>
20-
<ui-nav-menu>
21-
<Link to="/app" rel="home">
22-
Home
23-
</Link>
24-
<Link to="/app/additional">Additional page</Link>
25-
</ui-nav-menu>
20+
<s-app-nav>
21+
<s-link href="/app">Home</s-link>
22+
<s-link href="/app/additional">Additional page</s-link>
23+
</s-app-nav>
2624
<Outlet />
2725
</AppProvider>
2826
);

0 commit comments

Comments
 (0)