Skip to content

Commit

Permalink
Add @vercel/speed-insights package and remove unused imports
Browse files Browse the repository at this point in the history
  • Loading branch information
minpeter committed Jan 24, 2024
1 parent 40fb0b5 commit 5bd4dcb
Show file tree
Hide file tree
Showing 4 changed files with 38 additions and 2 deletions.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
"@types/react": "^18.2.39",
"@types/react-dom": "^18.2.17",
"@vercel/analytics": "^1.1.1",
"@vercel/speed-insights": "^1.0.7",
"axios": "^1.6.2",
"react": "^18.2.0",
"react-dom": "^18.2.0",
Expand Down
30 changes: 30 additions & 0 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 0 additions & 2 deletions src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import { useState, useEffect } from 'react';
import toast, { Toaster, useToasterStore } from 'react-hot-toast';
import { Navbar } from './components';
import * as S from './styles/app';
import { Analytics } from '@vercel/analytics/react';
import axios from 'axios';

import { MainPage, DownloadPage, DeletePage, FileListPage, ApiPage, NotFoundPage } from './pages';
Expand Down Expand Up @@ -87,7 +86,6 @@ export default function App() {
<Route path="*" element={<NotFoundPage />} />
</Route>
</Routes>
<Analytics />
</>
);
}
7 changes: 7 additions & 0 deletions src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,19 @@ import { Global } from '@emotion/react';
import { BrowserRouter } from 'react-router-dom';
import { globalStyle } from './styles';
import { createRoot } from 'react-dom/client';

import { Analytics } from '@vercel/analytics/react';
import { SpeedInsights } from '@vercel/speed-insights/react';

import App from './App';

const root = createRoot(document.getElementById('root') as HTMLElement);
root.render(
<BrowserRouter>
<Global styles={globalStyle} />
<App />

<Analytics />
<SpeedInsights />
</BrowserRouter>
);

0 comments on commit 5bd4dcb

Please sign in to comment.