🔥 fixed toast not appearing

This commit is contained in:
Chirag Bhalotia 2023-06-24 12:34:10 +05:30
parent 4527b564c1
commit cfbf08e9b9
No known key found for this signature in database
GPG Key ID: F7F1F1FBFFD40427
2 changed files with 27 additions and 11 deletions

View File

@ -1,22 +1,24 @@
import './globals.css'
import { Source_Code_Pro } from 'next/font/google'
import './globals.css';
import { Source_Code_Pro } from 'next/font/google';
import Providers from '@/components/Providers';
const inter = Source_Code_Pro({subsets:['latin']})
const inter = Source_Code_Pro({ subsets: ['latin'] });
export const metadata = {
title: 'Create Next App',
description: 'Generated by create next app',
}
title: 'Create Next App',
description: 'Generated by create next app',
};
export default function RootLayout({
children,
children,
}: {
children: React.ReactNode
children: React.ReactNode;
}) {
return (
return (
<html lang="en">
<body className={`${inter.className} bg-black text-white min-h-screen`}>{children}</body>
<body className={`${inter.className} bg-black text-white min-h-screen`}>
<Providers>{children}</Providers>
</body>
</html>
);
}

View File

@ -0,0 +1,14 @@
'use client';
import React from 'react';
import { Toaster } from 'react-hot-toast';
function Providers({ children }: { children: React.ReactNode }) {
return (
<>
<Toaster position={'top-right'} reverseOrder={false} />
{children}
</>
);
}
export default Providers;