Initial commit: Tapalka monorepo (bot, front, strapi)

This commit is contained in:
2026-05-21 11:54:44 +07:00
commit 9ec9485940
208 changed files with 58314 additions and 0 deletions

View File

@@ -0,0 +1,21 @@
'use client';
import { PropsWithChildren, useEffect } from 'react';
import { useTokenStore } from '@/store/token.state';
import { ConfigApi } from '@/api/config.api';
import { useConfigStore } from '@/store/config.state';
export const ConfigProvider = ({ children }: PropsWithChildren) => {
const { setConfig } = useConfigStore();
const { token } = useTokenStore();
useEffect(() => {
if (!token) {
return;
}
const api = ConfigApi.getInstance(token);
api.getConfig().then(config => setConfig(config.data));
}, [token]);
return <>{children}</>;
};