Rename main Curtains component to CurtainsProvider.
This commit is contained in:
parent
64a77d077c
commit
cc3e292f40
2 changed files with 5 additions and 5 deletions
|
@ -1,7 +1,7 @@
|
||||||
import { IconContext } from "@phosphor-icons/react";
|
import { IconContext } from "@phosphor-icons/react";
|
||||||
import React from "react";
|
import React from "react";
|
||||||
import {createBrowserRouter, RouterProvider} from "react-router-dom";
|
import {createBrowserRouter, RouterProvider} from "react-router-dom";
|
||||||
import {Curtains} from "../Components/Curtains/Curtains";
|
import {CurtainsProvider} from "../Components/Curtains/Curtains";
|
||||||
import {NotificationsProvider} from "../Components/Notifications/Notifications";
|
import {NotificationsProvider} from "../Components/Notifications/Notifications";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -19,11 +19,11 @@ export function Kernel({header, footer, router}: {
|
||||||
weight: "bold",
|
weight: "bold",
|
||||||
}}>
|
}}>
|
||||||
<NotificationsProvider>
|
<NotificationsProvider>
|
||||||
<Curtains>
|
<CurtainsProvider>
|
||||||
{header}
|
{header}
|
||||||
<RouterProvider router={router} />
|
<RouterProvider router={router} />
|
||||||
{footer}
|
{footer}
|
||||||
</Curtains>
|
</CurtainsProvider>
|
||||||
</NotificationsProvider>
|
</NotificationsProvider>
|
||||||
</IconContext.Provider>
|
</IconContext.Provider>
|
||||||
);
|
);
|
||||||
|
|
|
@ -105,9 +105,9 @@ export function useCallableCurtain<F extends CallableCurtainElement>(curtainElem
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Page curtains system.
|
* Page curtains provider.
|
||||||
*/
|
*/
|
||||||
export function Curtains({children}: React.PropsWithChildren<{}>)
|
export function CurtainsProvider({children}: React.PropsWithChildren<{}>)
|
||||||
{
|
{
|
||||||
// Curtains state.
|
// Curtains state.
|
||||||
const [curtains, setCurtains] = useState<Record<CurtainUuidType, React.ReactNode>>({});
|
const [curtains, setCurtains] = useState<Record<CurtainUuidType, React.ReactNode>>({});
|
||||||
|
|
Loading…
Reference in a new issue