-
Notifications
You must be signed in to change notification settings - Fork 17
Description
Describe the bug
When invoking Superplate with refine-react, auth0 and custom layout app.tsx runs into errors of type "Import in body of module; reorder to top import/first". It's easily enough fixed by reordering the imports to the top, but can be a tad irritating for people trialling the product.
To Reproduce
Steps to reproduce the behavior:
❯ npx superplate-cli refine-tutorial
✔ Cloned remote source successfully.
✔ Select your project type › refine-react
✔ What will be the name of your app · refine-tutorial
✔ Package manager: · yarn
✔ Do you want to customize theme?: · css
✔ Data Provider: · graphql-data-provider
✔ Auth Provider: · auth0-auth-provider
✔ Do you want to customize layout? · custom-layout
✔ i18n - Internationalization: · i18n
Expected behavior
A clear and concise description of what you expected to happen.
Screenshots
If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):
- OS: macOS
- Browser Edge
- Version 95.0.1020.44
- Used dataProvider graphql
Smartphone (please complete the following information):
N/A
Additional context
Add any other context about the problem here.
Detail Errors:
src/App.tsx
Line 11:1: Import in body of module; reorder to top import/first
Line 12:1: Import in body of module; reorder to top import/first
Line 13:1: Import in body of module; reorder to top import/first
Line 14:1: Import in body of module; reorder to top import/first
Line 22:1: Import in body of module; reorder to top import/first
Auto-generated code in App.tsx:
import { Refine, AuthProvider } from "@pankod/refine";
import routerProvider from "@pankod/refine-react-router";
import "@pankod/refine/dist/styles.min.css";
import dataProvider from "@pankod/refine-graphql";
import { GraphQLClient } from "graphql-request";
const API_URL = "https://your-graphql-url/graphql";
const client = new GraphQLClient(API_URL);
const gqlDataProvider = dataProvider(client);
import axios from "axios";
import { useAuth0 } from "@auth0/auth0-react";
import { Login } from "pages/login";