Expand AITURK Turkish settings and desktop surfaces for beta 5
This commit is contained in:
@@ -1,8 +1,14 @@
|
||||
import { useEffect, useRef } from 'react'
|
||||
|
||||
import { useI18n } from '@/i18n'
|
||||
import { setPetActivity } from '@/store/pet'
|
||||
import { setPetScale } from '@/store/pet-gallery'
|
||||
import { setPetOverlayOpenAppHandler, setPetOverlayScaleHandler, setPetOverlaySubmitHandler } from '@/store/pet-overlay'
|
||||
import {
|
||||
setPetOverlayLocale,
|
||||
setPetOverlayOpenAppHandler,
|
||||
setPetOverlayScaleHandler,
|
||||
setPetOverlaySubmitHandler
|
||||
} from '@/store/pet-overlay'
|
||||
import { $sessions } from '@/store/session'
|
||||
import { $attentionSessionIds } from '@/store/session-states'
|
||||
import { isAuxiliaryWindow } from '@/store/windows'
|
||||
@@ -23,6 +29,12 @@ interface PetBridgeParams {
|
||||
* window that can drop a submit. Primary window only.
|
||||
*/
|
||||
export function usePetBridge({ requestGateway, resumeSession, submitText }: PetBridgeParams): void {
|
||||
const { locale } = useI18n()
|
||||
useEffect(() => {
|
||||
if (!isAuxiliaryWindow()) {
|
||||
setPetOverlayLocale(locale)
|
||||
}
|
||||
}, [locale])
|
||||
const submitTextRef = useRef(submitText)
|
||||
submitTextRef.current = submitText
|
||||
const resumeSessionRef = useRef(resumeSession)
|
||||
|
||||
Reference in New Issue
Block a user