0

I had changed the name of one of my JS files from price2 to deposit, and in MainRoutes.js I also changed it, but it's showing me an error that clientdepositmoney is assigned a value but never used no-unused-vars, but I already assigned!

// render - sample page
const ContactUS = Loadable(lazy(() => import('pages/contact-us')));
const clientdepositmoney = Loadable(lazy(() => import('pages/apps/invoice/deposit')));
const UserGuides = Loadable(lazy(() => import('pages/Documentations/client-guide')));

    {
      path: 'invoice',
      children: [
        {
          path: 'deposit',
          element: <clientdepositmoney />
        },
        {
          path: 'dashboard',
          element: <AppInvoiceDashboard />
        },
        {
          path: 'create',
          element: <AppInvoiceCreate />
        },
        {
          path: 'details/:id',
          element: <AppInvoiceDetails />
        },

the error message is:

ERROR in [eslint] src\routes\MainRoutes.js Line 123:7: 'clientdepositmoney' is assigned a value but never used no-unused-vars

Search for the keywords to learn more about each error.

webpack compiled with 1 error and 1 warning

Drew Reese
  • 165,259
  • 14
  • 153
  • 181
  • You might try the solutions in [this question](https://stackoverflow.com/questions/42541559/eslint-with-react-gives-no-unused-vars-errors) – Pointy Jul 01 '23 at 14:08
  • If `clientdepositmoney` is supposed to be a React component it should be capitalized, e.g. `Clientdepositmoney`. – Drew Reese Jul 01 '23 at 19:35

0 Answers0