feat: init settings

This commit is contained in:
hamster1963
2024-12-15 21:26:31 +08:00
parent c3668402d5
commit 9551d46800
10 changed files with 154 additions and 122 deletions

View File

@@ -1,8 +0,0 @@
import { createContext } from "react"
export interface FilterContextType {
filter: boolean
setFilter: (filter: boolean) => void
}
export const FilterContext = createContext<FilterContextType | undefined>(undefined)

View File

@@ -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>
}