Rename main Curtains component to CurtainsProvider.

This commit is contained in:
Madeorsk 2024-07-14 19:54:13 +02:00
parent 64a77d077c
commit cc3e292f40
Signed by: Madeorsk
SSH key fingerprint: SHA256:J9G0ofIOLKf7kyS2IfrMqtMaPdfsk1W02+oGueZzDDU
2 changed files with 5 additions and 5 deletions

View file

@ -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>
); );

View file

@ -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>>({});