diff --git a/app/routes/_index/route.jsx b/app/routes/_index/route.jsx index a86cc468..03124fa7 100644 --- a/app/routes/_index/route.jsx +++ b/app/routes/_index/route.jsx @@ -1,7 +1,7 @@ import { json, redirect } from "@remix-run/node"; import { Form, useLoaderData } from "@remix-run/react"; -import { login } from "../../shopify.server"; +import { canUseLoginForm } from "../../shopify.server"; import indexStyles from "./style.css"; @@ -14,7 +14,7 @@ export async function loader({ request }) { throw redirect(`/app?${url.searchParams.toString()}`); } - return json({ showForm: Boolean(login) }); + return json({ showForm: canUseLoginForm }); } export default function App() { diff --git a/app/shopify.server.js b/app/shopify.server.js index d92d854a..8e72c6a5 100644 --- a/app/shopify.server.js +++ b/app/shopify.server.js @@ -37,6 +37,7 @@ const shopify = shopifyApp({ export default shopify; export const addResponseHeaders = shopify.addResponseHeaders; export const authenticate = shopify.authenticate; +export const canUseLoginForm = shopify.canUseLoginForm; export const login = shopify.login; export const registerWebhooks = shopify.registerWebhooks; export const sessionStorage = shopify.sessionStorage;