mirror of
https://github.com/swissmakers/swiss-datashare.git
synced 2026-04-17 12:43:13 +02:00
13 lines
305 B
TypeScript
13 lines
305 B
TypeScript
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 };
|