feat: 💨
This commit is contained in:
parent
695f2fe017
commit
ed843f637a
8 changed files with 198 additions and 197 deletions
8
src/providers/PageActiveProvider.tsx
Normal file
8
src/providers/PageActiveProvider.tsx
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
import { createContext, useContext } from 'react'
|
||||
|
||||
export const PageActiveContext = createContext<boolean | null>(null)
|
||||
|
||||
export function usePageActive() {
|
||||
const ctx = useContext(PageActiveContext)
|
||||
return ctx ?? false
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue