mirror of
https://github.com/Buriburizaem0n/nezha-dash-v1.git
synced 2026-03-22 02:51:53 +00:00
feat: init settings
This commit is contained in:
@@ -1,8 +0,0 @@
|
||||
import { createContext } from "react"
|
||||
|
||||
export interface FilterContextType {
|
||||
filter: boolean
|
||||
setFilter: (filter: boolean) => void
|
||||
}
|
||||
|
||||
export const FilterContext = createContext<FilterContextType | undefined>(undefined)
|
||||
@@ -1,11 +0,0 @@
|
||||
"use client"
|
||||
|
||||
import { ReactNode, useState } from "react"
|
||||
|
||||
import { FilterContext } from "./filter-context"
|
||||
|
||||
export function FilterProvider({ children }: { children: ReactNode }) {
|
||||
const [filter, setFilter] = useState<boolean>(false)
|
||||
|
||||
return <FilterContext.Provider value={{ filter, setFilter }}>{children}</FilterContext.Provider>
|
||||
}
|
||||
Reference in New Issue
Block a user