All checks were successful
Deploy to Production / Build and Deploy (push) Successful in 5s
- Fix useBrainstormSocket: stable guestId via useRef, remove setState in cleanup - Fix GhostCursor: direct DOM manipulation via refs, no useState re-renders - Fix all SQL embedding queries: add ::vector cast on text columns - Fix embedding truncation to 15000 chars (under 8192 token limit) - Fix NoteEmbedding INSERT: remove non-existent updatedAt column - Fix billing page: show all quota stats in grid instead of single metric - Fix usage meter: accordion expand/collapse, per-feature detail - Fix semantic search: rebuild 103 note embeddings, ::vector cast on vectorSearch - Fix brainstorm expand/manual-idea/create: ::vector cast on embedding SQL
42 lines
1.1 KiB
TypeScript
42 lines
1.1 KiB
TypeScript
'use client'
|
|
|
|
import { LanguageProvider, useLanguage } from '@/lib/i18n/LanguageProvider'
|
|
import { QueryProvider } from '@/components/query-provider'
|
|
import type { Translations } from '@/lib/i18n/load-translations'
|
|
import type { ReactNode } from 'react'
|
|
import { useEffect } from 'react'
|
|
|
|
const RTL_LANGUAGES = ['ar', 'fa']
|
|
|
|
function DirWrapper({ children }: { children: ReactNode }) {
|
|
const { language } = useLanguage()
|
|
const dir = RTL_LANGUAGES.includes(language) ? 'rtl' : 'ltr'
|
|
|
|
useEffect(() => {
|
|
document.documentElement.lang = language
|
|
document.documentElement.dir = dir
|
|
}, [language, dir])
|
|
|
|
return <div dir={dir} className="contents">{children}</div>
|
|
}
|
|
|
|
export function PublicProviders({
|
|
children,
|
|
initialLanguage = 'en',
|
|
initialTranslations
|
|
}: {
|
|
children: ReactNode
|
|
initialLanguage?: string
|
|
initialTranslations?: Translations
|
|
}) {
|
|
return (
|
|
<QueryProvider>
|
|
<LanguageProvider initialLanguage={initialLanguage as any} initialTranslations={initialTranslations}>
|
|
<DirWrapper>
|
|
{children}
|
|
</DirWrapper>
|
|
</LanguageProvider>
|
|
</QueryProvider>
|
|
)
|
|
}
|