feat: complete i18n support, telegram webhook, and security improvements

This commit is contained in:
AyrisAI
2026-05-14 13:46:17 +03:00
parent 4c9a07e3ef
commit cc65a2bd72
23 changed files with 798 additions and 205 deletions

View File

@@ -0,0 +1,27 @@
"use client";
import React, { createContext, useContext } from "react";
const DictionaryContext = createContext<any>(null);
export function DictionaryProvider({
dictionary,
children,
}: {
dictionary: any;
children: React.ReactNode;
}) {
return (
<DictionaryContext.Provider value={dictionary}>
{children}
</DictionaryContext.Provider>
);
}
export function useDictionary() {
const context = useContext(DictionaryContext);
if (!context) {
throw new Error("useDictionary must be used within a DictionaryProvider");
}
return context;
}