Skip to content

Commit

Permalink
feat: added providers
Browse files Browse the repository at this point in the history
  • Loading branch information
triyanox committed Jul 24, 2024
1 parent a611a08 commit 9d54ff9
Show file tree
Hide file tree
Showing 4 changed files with 50 additions and 10 deletions.
23 changes: 13 additions & 10 deletions app/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import type { Metadata } from 'next';
import localFont from 'next/font/local';
import React from 'react';
import './globals.css';
import { Providers } from '@/components/providers';

const satoshi = localFont({
src: './fonts/Satoshi-Variable.woff2',
Expand All @@ -25,16 +26,18 @@ export default function RootLayout({
children: React.ReactNode;
}>) {
return (
<html lang="en" className="">
<body
className={cn(
satoshi.variable,
geistMono.variable,
'bg-white font-sans',
)}
>
{children}
</body>
<html lang="en">
<Providers>
<body
className={cn(
satoshi.variable,
geistMono.variable,
'bg-white font-sans',
)}
>
{children}
</body>
</Providers>
</html>
);
}
13 changes: 13 additions & 0 deletions components/providers.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
'use client';

import { Analytics } from '@vercel/analytics/react';
import { Fragment } from 'react';

export function Providers({ children }: { children: React.ReactNode }) {
return (
<Fragment>
{children}
<Analytics mode="production" />
</Fragment>
);
}
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
"@radix-ui/react-toggle-group": "^1.1.0",
"@radix-ui/react-tooltip": "^1.1.2",
"@use-gesture/react": "^10.3.1",
"@vercel/analytics": "^1.3.1",
"class-variance-authority": "^0.7.0",
"clsx": "^2.1.1",
"cmdk": "^1.0.0",
Expand Down
23 changes: 23 additions & 0 deletions pnpm-lock.yaml

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

0 comments on commit 9d54ff9

Please sign in to comment.