feat: split contexts, providers and hooks
This commit is contained in:
12
src/providers/AppProvider.tsx
Normal file
12
src/providers/AppProvider.tsx
Normal file
@@ -0,0 +1,12 @@
|
||||
import { type ReactNode, useState } from "react";
|
||||
import { AppContext } from "~/context/AppContext";
|
||||
|
||||
export const AppProvider = (props: { children?: ReactNode }) => {
|
||||
const [activeKitty, setActiveKitty] = useState(":r0:");
|
||||
|
||||
return (
|
||||
<AppContext.Provider value={{ activeKitty, setActiveKitty }}>
|
||||
{props.children}
|
||||
</AppContext.Provider>
|
||||
);
|
||||
};
|
||||
Reference in New Issue
Block a user