Skip to content

Commit

Permalink
Merge pull request #252 from Shopify/revert-251-remove_can_use_login_…
Browse files Browse the repository at this point in the history
…form

Revert "Remove `canUseLoginForm` usage"
  • Loading branch information
paulomarg authored Jul 17, 2023
2 parents f13f58a + cdf7e70 commit 214b981
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/routes/_index/route.jsx
Original file line number Diff line number Diff line change
@@ -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";

Expand All @@ -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() {
Expand Down
1 change: 1 addition & 0 deletions app/shopify.server.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;

0 comments on commit 214b981

Please sign in to comment.