This commit is contained in:
Michael Freno
2025-12-18 13:35:01 -05:00
parent b43f693295
commit 372a8aa5fc
8 changed files with 59 additions and 177 deletions

View File

@@ -1,26 +0,0 @@
import { Accessor, createContext, useContext } from "solid-js";
import { createSignal } from "solid-js";
// Create context with initial value
const SplashContext = createContext<{
showSplash: Accessor<boolean>;
setShowSplash: (show: boolean) => void;
}>({
showSplash: () => true,
setShowSplash: () => {}
});
export function useSplash() {
const context = useContext(SplashContext);
return context;
}
export function SplashProvider(props: { children: any }) {
const [showSplash, setShowSplash] = createSignal(true);
return (
<SplashContext.Provider value={{ showSplash, setShowSplash }}>
{props.children}
</SplashContext.Provider>
);
}