import { redirect } from "@remix-run/node"; import { Form, useLoaderData } from "@remix-run/react"; import { login } from "../../shopify.server"; import styles from "./styles.module.css"; export const loader = async ({ request }) => { const url = new URL(request.url); if (url.searchParams.get("shop")) { throw redirect(`/app?${url.searchParams.toString()}`); } return { showForm: Boolean(login) }; }; export default function App() { const { showForm } = useLoaderData(); return (

A short heading about [your app]

A tagline about [your app] that describes your value proposition.

{showForm && (
)}
); }