First Commit

This commit is contained in:
cesnimda
2026-03-21 11:55:27 +01:00
commit 2e8a29b4d0
1757 changed files with 166084 additions and 0 deletions
@@ -0,0 +1,25 @@
import { use } from 'react';
// @project
import { ConfigContext } from '@/contexts/ConfigContext';
/*************************** HOOKS - CONFIG ***************************/
/**
* Custom hook to access the application's configuration context.
*
* This hook provides an easy way to consume the `ConfigContext`,
* which typically contains application-wide settings like themes,
* layouts, or other configurable options.
*
* @returns {any} The value provided by the `ConfigContext`.
* Ensure that the component using this hook is wrapped with a `ConfigProvider`.
*/
export default function useConfig() {
const context = use(ConfigContext);
if (!context) throw new Error('useSConfig must be use inside ConfigProvider');
return context;
}