feat: support hiding indirect notifications

This commit is contained in:
codytseng 2026-01-20 22:47:42 +08:00
parent 331811f683
commit 2cd1ae481b
27 changed files with 196 additions and 38 deletions

View file

@ -0,0 +1,14 @@
import { createContext, useContext } from 'react'
type TNotificationUserPreferenceContext = {
hideIndirect: boolean
updateHideIndirect: (enable: boolean) => void
}
export const NotificationUserPreferenceContext =
createContext<TNotificationUserPreferenceContext | null>(null)
export function useNotificationUserPreference() {
const ctx = useContext(NotificationUserPreferenceContext)
return ctx ?? { hideIndirect: false, updateHideIndirect: () => {} }
}