Change environment variables strategy

This commit is contained in:
Elias Schneider
2022-05-02 08:22:53 +02:00
parent 961967f57a
commit 1c90cf63ce
11 changed files with 67 additions and 26 deletions

12
src/utils/config.util.ts Normal file
View File

@@ -0,0 +1,12 @@
import axios from "axios";
import { createContext, useContext } from "react";
export const ConfigContext = createContext<any>({});
export const useConfig = () => useContext(ConfigContext);
const getGonfig = async() => {
return (await axios.get("/api/config")).data;
};
export default { getGonfig };