fix(lint): avoid effect self-references in async loaders
This commit is contained in:
@@ -67,7 +67,7 @@ export default function NotificationsPage() {
|
||||
const [loadingError, setLoadingError] = useState<string | null>(null)
|
||||
const [markingAll, setMarkingAll] = useState(false)
|
||||
|
||||
const loadNotifications = useCallback(async () => {
|
||||
const loadNotifications = useCallback(async function loadNotifications() {
|
||||
setLoading(true)
|
||||
setLoadingError(null)
|
||||
|
||||
@@ -100,7 +100,7 @@ export default function NotificationsPage() {
|
||||
}
|
||||
}, [loadNotifications])
|
||||
|
||||
const markAllAsRead = useCallback(async () => {
|
||||
const markAllAsRead = useCallback(async function markAllAsRead() {
|
||||
if (markAllPendingRef.current) return
|
||||
|
||||
markAllPendingRef.current = true
|
||||
|
||||
Reference in New Issue
Block a user