mirror of
https://github.com/MODSetter/SurfSense.git
synced 2026-05-03 21:02:40 +02:00
refactor: Remove deprecated create_connector_indexed_notification method and add notification types
- Removed the deprecated create_connector_indexed_notification method from NotificationService. - Introduced new notification types and schemas in notification.types.ts to standardize notification handling. - Updated useNotifications hook to utilize the new notification type definitions.
This commit is contained in:
parent
e38e6d90e0
commit
59a8ef5d64
5 changed files with 115 additions and 60 deletions
|
|
@ -2,19 +2,9 @@
|
|||
|
||||
import { useEffect, useState, useCallback, useRef } from 'react'
|
||||
import { initElectric, isElectricInitialized, type ElectricClient, type SyncHandle } from '@/lib/electric/client'
|
||||
import type { Notification } from '@/contracts/types/notification.types'
|
||||
|
||||
export interface Notification {
|
||||
id: number
|
||||
user_id: string
|
||||
search_space_id: number | null
|
||||
type: string
|
||||
title: string
|
||||
message: string
|
||||
read: boolean
|
||||
metadata: Record<string, unknown>
|
||||
created_at: string
|
||||
updated_at: string | null
|
||||
}
|
||||
export type { Notification } from '@/contracts/types/notification.types'
|
||||
|
||||
export function useNotifications(userId: string | null) {
|
||||
const [electric, setElectric] = useState<ElectricClient | null>(null)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue