feat: toggle Sentry and API url when loading site from localhost

This commit is contained in:
spiral
2022-04-07 09:21:57 -04:00
parent 621272c842
commit 01f76c77f0
2 changed files with 2 additions and 2 deletions

View File

@@ -1,7 +1,7 @@
import axios from 'axios';
import * as Sentry from '@sentry/browser';
const baseUrl = () => localStorage.isBeta ? "https://api.beta.pluralkit.me" : "https://api.pluralkit.me";
const baseUrl = () => window.location.origin.includes("localhost") ? "http://localhost:5000" : localStorage.isBeta ? "https://api.beta.pluralkit.me" : "https://api.pluralkit.me";
const methods = ['get', 'post', 'delete', 'patch', 'put'];
const noop = () => {};