This commit is contained in:
2026-03-26 08:09:01 +03:30
parent 5b10807004
commit 333bc0c69e
37 changed files with 940 additions and 575 deletions

View File

@@ -0,0 +1,20 @@
"use client";
import { createContext, useContext } from "react";
type Language = {
title: string;
slug: string;
};
export const LanguageContext = createContext<Language[] | null>(null);
export const useLanguages = () => {
const context = useContext(LanguageContext);
if (!context) {
throw new Error("useLanguages must be used inside LanguageProvider");
}
return context;
};