Skip to content

Commit

Permalink
nit: Adjust naming
Browse files Browse the repository at this point in the history
  • Loading branch information
carina-akaia committed Jun 10, 2024
1 parent b6ba110 commit f15a86c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
8 changes: 5 additions & 3 deletions src/app/_layout/RootProvider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,11 @@ import { Provider as ReduxProvider } from "react-redux";
import { store } from "@/app/_store";
import { AuthProvider } from "@/modules/auth/providers/AuthProvider";

const Providers = ({ children }: { children: React.ReactNode }) => {
export type RootProviderProps = {
children: React.ReactNode;
};

export const RootProvider: React.FC<RootProviderProps> = ({ children }) => {
return (
<NiceModalProvider>
<ReduxProvider store={store}>
Expand All @@ -15,5 +19,3 @@ const Providers = ({ children }: { children: React.ReactNode }) => {
</NiceModalProvider>
);
};

export default Providers;
6 changes: 3 additions & 3 deletions src/app/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import { Lora } from "next/font/google";
import { cn } from "@/common/ui/utils";

import Nav from "./_layout/Nav";
import Providers from "./_layout/RootProvider";
import { RootProvider } from "./_layout/RootProvider";

const lora = Lora({
subsets: ["latin"],
Expand Down Expand Up @@ -59,12 +59,12 @@ export default function RootLayout({
return (
<html lang="en" suppressHydrationWarning={true}>
<body className={`${cn("font-lora antialiased", lora.variable)}`}>
<Providers>
<RootProvider>
<div className="container">
<Nav />
{children}
</div>
</Providers>
</RootProvider>
</body>
</html>
);
Expand Down

0 comments on commit f15a86c

Please sign in to comment.