mirror of
https://github.com/steveiliop56/tinyauth.git
synced 2025-10-28 12:45:47 +00:00
refactor: switch to declarative mode instead of data mode in react router
This commit is contained in:
@@ -1,7 +1,8 @@
|
||||
import { useAppContext } from "@/context/app-context";
|
||||
import { LanguageSelector } from "../language/language";
|
||||
import { Outlet } from "react-router";
|
||||
|
||||
export const Layout = ({ children }: { children: React.ReactNode }) => {
|
||||
export const Layout = () => {
|
||||
const { backgroundImage } = useAppContext();
|
||||
|
||||
return (
|
||||
@@ -14,7 +15,7 @@ export const Layout = ({ children }: { children: React.ReactNode }) => {
|
||||
}}
|
||||
>
|
||||
<LanguageSelector />
|
||||
{children}
|
||||
<Outlet />
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user