1import React from "react";
2import Horizantal from "../../layout/Horizantal/"; 3
4import ProductEdittor from "./ProductEdittor";
5
1import React from "react";
2import Horizantal from "../../layout/Horizantal/"; 3import Checkout from "./Checkout";
4
5import "./Home.scss";
1import React from "react";
2import Horizantal from "../../../layout/Horizantal/";3import LoadingPage from "./LoadingPage";
4
5const Loading: React.FC = () => {
6import toast, { Toaster } from "react-hot-toast";
7import PrivateRoute from "./router/PrivateRoute";
8import useLogin from "./hooks/useLogin";
9import Horizantal from "./layout/Horizantal/";10import { getCategories } from "./redux/slices/categorySlice";
11import { getProducts } from "./redux/slices/productSlice";
12import { getCarts } from "./redux/slices/cartSlice";
Unnecessarily complex import statements can be simplified. Complex imports usually result in confusing code. This usually happens as a result of refactoring.
For the following project structure
├── root.config.js
├── .deepsource.toml
└── calculator
├── index.js
├── calc.js
└── config.js
└── utils
└── pofyfills.js
└── index.js
// <!-- calcuator/index.js -->
import utils from './utils/index.js' // unnecessary to mentioned `index.js` at the end. NodeJS always resolves using index.js
import config from './../root.config.js' // unnecessary to add the `./`/
import polyfills from './utils//polyfills.js' // unnecessary to add the extra `/` before `polyfills.js`
import { processUtils } from './utils/' // unnecessary to add the extra `/` after `./utils`
// <!-- calcuator/index.js -->
import utils from './utils'
import config from '../root.config.js' // unnecessary to add the `./`/
import polyfills from './utils/polyfills.js' // unnecessary to add the extra `/` before `polyfills.js`
import { processUtils } from './utils' // unnecessary to add the extra `/` after `./utils`