change structure bump version
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
import { createContext, useContext } from "react";
|
||||
|
||||
const CardDepthContext = createContext(0);
|
||||
|
||||
export function useCardDepth() {
|
||||
return useContext(CardDepthContext);
|
||||
}
|
||||
|
||||
export function CardDepthProvider({ children }: { children: React.ReactNode }) {
|
||||
const depth = useCardDepth();
|
||||
return (
|
||||
<CardDepthContext.Provider value={depth + 1}>
|
||||
{children}
|
||||
</CardDepthContext.Provider>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user