Skip to content

Commit 2707466

Browse files
committed
feat: update provider
1 parent af1ad03 commit 2707466

File tree

4 files changed

+13
-12
lines changed

4 files changed

+13
-12
lines changed

apps/web/@/actions/auth/index.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,8 @@ export const signUp = async (
4141
password: hashedPassword,
4242
},
4343
})
44+
45+
// send email
4446
} catch (error) {
4547
if (error?.error?.code === "P2002") {
4648
return {
File renamed without changes.

apps/web/@/providers/index.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,16 @@
22

33
import { ThemeProvider } from "next-themes"
44

5+
import AuthProvider from "./authProvider"
6+
57
export function Providers({ children }: { children: React.ReactNode }) {
68
return (
79
<ThemeProvider
810
attribute="class"
911
defaultTheme="system"
1012
enableSystem
1113
>
12-
{children}
14+
<AuthProvider>{children}</AuthProvider>
1315
</ThemeProvider>
1416
)
1517
}

apps/web/app/[lang]/layout.tsx

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ import "ui/dist/index.css"
33
import "react-toastify/dist/ReactToastify.css"
44

55
import { NextIntlClientProvider, useMessages } from "next-intl"
6-
import AuthProvider from "providers/authProvider"
76
import { ToastContainer } from "react-toastify"
87

98
import Footer from "@/molecules/footer"
@@ -35,16 +34,14 @@ export default function RootLayout({
3534
locale={lang}
3635
messages={messages}
3736
>
38-
<AuthProvider>
39-
<Providers>
40-
<Nav />
41-
<main className="container mx-auto mt-12 min-h-[800px] px-4 pb-16 sm:px-6 lg:px-8">
42-
{children}
43-
<ToastContainer />
44-
</main>
45-
<Footer />
46-
</Providers>
47-
</AuthProvider>
37+
<Providers>
38+
<Nav />
39+
<main className="container mx-auto mt-12 min-h-[800px] px-4 pb-16 sm:px-6 lg:px-8">
40+
{children}
41+
<ToastContainer />
42+
</main>
43+
<Footer />
44+
</Providers>
4845
</NextIntlClientProvider>
4946
</body>
5047
</html>

0 commit comments

Comments
 (0)