Skip to main content
Glama
useEditedContentRenderer.ts845 B
import type { KeyPath } from '@intlayer/types'; import { type ComputedRef, computed, inject } from 'vue'; import { createSharedComposable } from './createSharedComposable'; export interface EditedContentActions { getEditedContentValue(dictionaryKey: string, keyPath: KeyPath[]): unknown; } /** * Mirrors the React hook one-for-one. */ export const useEditedContentRenderer = createSharedComposable( ( dictionaryKey: string, keyPath: KeyPath[], fallback: unknown ): ComputedRef<unknown> => { const editedContentContext = inject<EditedContentActions | null>( 'editedContentActions', null ); return computed(() => { const edited = editedContentContext?.getEditedContentValue( dictionaryKey, keyPath ) as string | undefined; return edited ?? fallback; }); } );

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/aymericzip/intlayer'

If you have feedback or need assistance with the MCP directory API, please join our Discord server