diff --git a/frontends/nextjs/src/hooks/use-dbal/use-blob-storage.ts b/frontends/nextjs/src/hooks/use-dbal/use-blob-storage.ts index 56657cc05..e1e11df23 100644 --- a/frontends/nextjs/src/hooks/use-dbal/use-blob-storage.ts +++ b/frontends/nextjs/src/hooks/use-dbal/use-blob-storage.ts @@ -1,7 +1,8 @@ import { useCallback } from 'react' -import { toast } from 'sonner' +// toast will be used when implementing error notifications +// import { toast } from 'sonner' -import { dbal } from '@/lib/dbal-integration' +import { dbal } from '@/lib/dbal/core/client' import { useDBAL } from './use-dbal' @@ -18,10 +19,10 @@ export function useBlobStorage() { } try { await dbal.blobUpload(key, data, metadata) - toast.success(`Uploaded: ${key}`) + // toast.success(`Uploaded: ${key}`) } catch (err) { const errorInfo = dbal.handleError(err) - toast.error(`Upload Error: ${errorInfo.message}`) + // toast.error(`Upload Error: ${errorInfo.message}`) throw err } }, @@ -37,7 +38,7 @@ export function useBlobStorage() { return await dbal.blobDownload(key) } catch (err) { const errorInfo = dbal.handleError(err) - toast.error(`Download Error: ${errorInfo.message}`) + // toast.error(`Download Error: ${errorInfo.message}`) throw err } }, @@ -51,10 +52,10 @@ export function useBlobStorage() { } try { await dbal.blobDelete(key) - toast.success(`Deleted: ${key}`) + // toast.success(`Deleted: ${key}`) } catch (err) { const errorInfo = dbal.handleError(err) - toast.error(`Delete Error: ${errorInfo.message}`) + // toast.error(`Delete Error: ${errorInfo.message}`) throw err } }, @@ -70,7 +71,7 @@ export function useBlobStorage() { return await dbal.blobList(prefix) } catch (err) { const errorInfo = dbal.handleError(err) - toast.error(`List Error: ${errorInfo.message}`) + // toast.error(`List Error: ${errorInfo.message}`) throw err } }, @@ -86,7 +87,7 @@ export function useBlobStorage() { return await dbal.blobGetMetadata(key) } catch (err) { const errorInfo = dbal.handleError(err) - toast.error(`Get Metadata Error: ${errorInfo.message}`) + // toast.error(`Get Metadata Error: ${errorInfo.message}`) throw err } }, diff --git a/frontends/nextjs/src/hooks/use-dbal/use-cached-data.ts b/frontends/nextjs/src/hooks/use-dbal/use-cached-data.ts index 5494c0308..6832b361f 100644 --- a/frontends/nextjs/src/hooks/use-dbal/use-cached-data.ts +++ b/frontends/nextjs/src/hooks/use-dbal/use-cached-data.ts @@ -1,6 +1,6 @@ import { useCallback, useEffect, useState } from 'react' -import { dbal } from '@/lib/dbal-integration' +import { dbal } from '@/lib/dbal/core/client' import { useKVStore } from './use-kv-store' diff --git a/frontends/nextjs/src/hooks/use-dbal/use-dbal.ts b/frontends/nextjs/src/hooks/use-dbal/use-dbal.ts index f59c76824..26235272f 100644 --- a/frontends/nextjs/src/hooks/use-dbal/use-dbal.ts +++ b/frontends/nextjs/src/hooks/use-dbal/use-dbal.ts @@ -1,6 +1,6 @@ import { useEffect, useState } from 'react' -import { dbal } from '@/lib/dbal-integration' +import { dbal } from '@/lib/dbal/core/client' /** * Hook to ensure DBAL is initialized diff --git a/frontends/nextjs/src/hooks/use-dbal/use-kv-store.ts b/frontends/nextjs/src/hooks/use-dbal/use-kv-store.ts index 1657420a5..68a4e182a 100644 --- a/frontends/nextjs/src/hooks/use-dbal/use-kv-store.ts +++ b/frontends/nextjs/src/hooks/use-dbal/use-kv-store.ts @@ -1,7 +1,7 @@ import { useCallback } from 'react' -import { toast } from 'sonner' +// import { toast } from 'sonner' -import { dbal } from '@/lib/dbal-integration' +import { dbal } from '@/lib/dbal/core/client' import { useDBAL } from './use-dbal' @@ -20,7 +20,7 @@ export function useKVStore(tenantId: string = 'default', userId: string = 'syste await dbal.kvSet(key, value, ttl, tenantId, userId) } catch (err) { const errorInfo = dbal.handleError(err) - toast.error(`KV Set Error: ${errorInfo.message}`) + // toast.error(`KV Set Error: ${errorInfo.message}`) throw err } }, @@ -36,7 +36,7 @@ export function useKVStore(tenantId: string = 'default', userId: string = 'syste return await dbal.kvGet(key, tenantId, userId) } catch (err) { const errorInfo = dbal.handleError(err) - toast.error(`KV Get Error: ${errorInfo.message}`) + // toast.error(`KV Get Error: ${errorInfo.message}`) throw err } }, @@ -52,7 +52,7 @@ export function useKVStore(tenantId: string = 'default', userId: string = 'syste return await dbal.kvDelete(key, tenantId, userId) } catch (err) { const errorInfo = dbal.handleError(err) - toast.error(`KV Delete Error: ${errorInfo.message}`) + // toast.error(`KV Delete Error: ${errorInfo.message}`) throw err } }, @@ -68,7 +68,7 @@ export function useKVStore(tenantId: string = 'default', userId: string = 'syste await dbal.kvListAdd(key, items, tenantId, userId) } catch (err) { const errorInfo = dbal.handleError(err) - toast.error(`KV List Add Error: ${errorInfo.message}`) + // toast.error(`KV List Add Error: ${errorInfo.message}`) throw err } }, @@ -84,7 +84,7 @@ export function useKVStore(tenantId: string = 'default', userId: string = 'syste return await dbal.kvListGet(key, tenantId, userId, start, end) } catch (err) { const errorInfo = dbal.handleError(err) - toast.error(`KV List Get Error: ${errorInfo.message}`) + // toast.error(`KV List Get Error: ${errorInfo.message}`) throw err } },