[example][m] - start of a simple-example

This commit is contained in:
Luccas Mateus de Medeiros Gomes
2023-04-18 08:19:58 -03:00
parent 34cbb1e8af
commit 751093baf6
43 changed files with 6837 additions and 238 deletions

View File

@@ -0,0 +1,11 @@
import axios from "axios";
export default function loadUrlProxied(url: string) {
// HACK: duplicate of Excel code - maybe refactor
// if url is external may have CORS issue so we proxy it ...
if (url.startsWith("http")) {
const PROXY_URL = "/api/proxy";
url = PROXY_URL + "?url=" + encodeURIComponent(url);
}
return axios.get(url).then((res) => res.data);
}