()
| 36 | } |
| 37 | |
| 38 | export default function Auth() { |
| 39 | const { polarisTranslations } = useLoaderData(); |
| 40 | const loaderData = useLoaderData(); |
| 41 | const actionData = useActionData(); |
| 42 | const [shop, setShop] = useState(""); |
| 43 | const { errors } = actionData || loaderData; |
| 44 | |
| 45 | return ( |
| 46 | <PolarisAppProvider i18n={polarisTranslations}> |
| 47 | <Page> |
| 48 | <Card> |
| 49 | <Form method="post"> |
| 50 | <FormLayout> |
| 51 | <Text variant="headingMd" as="h2"> |
| 52 | Log in |
| 53 | </Text> |
| 54 | <TextField |
| 55 | type="text" |
| 56 | name="shop" |
| 57 | label="Shop domain" |
| 58 | helpText="example.myshopify.com" |
| 59 | value={shop} |
| 60 | onChange={setShop} |
| 61 | autoComplete="on" |
| 62 | error={errors.shop} |
| 63 | /> |
| 64 | <Button submit>Log in</Button> |
| 65 | </FormLayout> |
| 66 | </Form> |
| 67 | </Card> |
| 68 | </Page> |
| 69 | </PolarisAppProvider> |
| 70 | ); |
| 71 | } |
nothing calls this directly
no outgoing calls
no test coverage detected