Example of how to create a data portal in 5 minutes (#769)

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

* Empty-Commit

* [simple-example][sm] - change from repos.json to datasets.json

* [example][m] - changed styling and added octokit

* [build][sm] - fix build
This commit is contained in:
Luccas Mateus
2023-04-18 13:51:48 -03:00
committed by GitHub
parent 4c4f56f679
commit 20ac80a5e8
43 changed files with 8050 additions and 246 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);
}