Skip to content

Commit

Permalink
remove router dev tools
Browse files Browse the repository at this point in the history
  • Loading branch information
pingustar committed Jan 23, 2024
1 parent 1a1edc4 commit b043899
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 18 deletions.
15 changes: 1 addition & 14 deletions src/App.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { CreateStrategyCTAMobile } from 'components/strategies/create/CreateStrategyCTA';
import { lazy, useEffect } from 'react';
import { useEffect } from 'react';
import { NotificationAlerts } from 'libs/notifications';
import { ModalProvider } from 'libs/modals';
import { useCarbonInit } from 'hooks/useCarbonInit';
Expand All @@ -8,18 +8,6 @@ import { MainContent } from 'components/core/MainContent';
import { useStore } from 'store';
import { Toaster } from 'components/common/Toaster/Toaster';

const TanStackRouterDevtools =
process.env.NODE_ENV === 'production'
? () => null // Render nothing in production
: lazy(() =>
// Lazy load in development
import('@tanstack/router-devtools').then((res) => ({
default: res.TanStackRouterDevtools,
// For Embedded Mode
// default: res.TanStackRouterDevtoolsPanel
}))
);

let didInit = false;

export const App = () => {
Expand Down Expand Up @@ -48,7 +36,6 @@ export const App = () => {
<MainMenu />
<main className="my-80 flex w-full flex-grow flex-col">
<MainContent />
<TanStackRouterDevtools position="bottom-right" />
</main>
<MobileMenu />
<ModalProvider />
Expand Down
6 changes: 2 additions & 4 deletions src/index.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import 'global-shim';
import 'init-sentry';
import React, { Suspense } from 'react';
import React from 'react';
import ReactDOM from 'react-dom/client';
import reportWebVitals from 'reportWebVitals';
import { StoreProvider } from 'store';
Expand All @@ -22,9 +22,7 @@ root.render(
<StoreProvider>
<Web3ReactWrapper>
<LazyMotion>
<Suspense>
<RouterProvider router={router} />
</Suspense>
<RouterProvider router={router} />
</LazyMotion>
</Web3ReactWrapper>
</StoreProvider>
Expand Down

0 comments on commit b043899

Please sign in to comment.