Skip to content

Commit

Permalink
Merge pull request #53 from patelvivekdev/development
Browse files Browse the repository at this point in the history
Fix dark mode flick
  • Loading branch information
patelvivekdev authored May 5, 2024
2 parents 7128fc7 + 584558e commit f3d276a
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 7 deletions.
8 changes: 5 additions & 3 deletions app/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import { SpeedInsights } from '@vercel/speed-insights/next';
import { Toaster } from 'react-hot-toast';
import Script from 'next/script';
import ScrollToTopButton from '@/components/ScrollToTopButton';
import { ThemeToggle } from '@/components/ThemeToggle';

const fontSans = FontSans({
subsets: ['latin'],
Expand Down Expand Up @@ -62,19 +63,20 @@ export default function RootLayout({
children: React.ReactNode;
}>) {
return (
<html lang='en' className='dark'>
<html lang='en'>
<head>
<Script defer src='https://us.umami.is/script.js' data-website-id='aa7603cb-3e5d-474c-b1a5-f92e18751e5c' />
</head>
<body className={cn('mx-auto font-sans antialiased bg-neutral-100 dark:bg-neutral-900 ', fontSans.variable)}>
<ThemeProvider attribute='class' defaultTheme='system' enableSystem={true}>
<Navbar />
<main>{children}</main>
<Analytics />
<SpeedInsights />
<Footer />
<ScrollToTopButton />
<ThemeToggle />
<Toaster position='top-right' />
<Footer />
<Analytics />
</ThemeProvider>
</body>
</html>
Expand Down
2 changes: 0 additions & 2 deletions components/Footer.jsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import Link from 'next/link';
import { ThemeToggle } from './ThemeToggle';

const Footer = () => {
// find the current year
Expand All @@ -12,7 +11,6 @@ const Footer = () => {
<p className='text-base font-semibold'>© {year} Vivek Patel | Made with ❤️ Next js</p>
</div>
</div>
<ThemeToggle />
</footer>
);
};
Expand Down
3 changes: 1 addition & 2 deletions tailwind.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@ const config: Config = {
'./pages/**/*.{js,ts,jsx,tsx,mdx}',
'./components/**/*.{js,ts,jsx,tsx,mdx}',
'./app/**/*.{js,ts,jsx,tsx,mdx}',
'./blogs/**/*.mdx',
'./projects/**/*.mdx',
'.content/**/*.mdx',
],
theme: {
extend: {
Expand Down

1 comment on commit f3d276a

@vercel
Copy link

@vercel vercel bot commented on f3d276a May 5, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.