1
0
mirror of https://github.com/ellmau/adf-obdd.git synced 2025-12-20 09:39:38 +01:00

Make fetch endpoint depend on environment

This commit is contained in:
monsterkrampe 2022-08-30 13:12:12 +02:00
parent dbde6b86f4
commit 86122357a6
No known key found for this signature in database
GPG Key ID: B8ADC1F5A5CE5057

View File

@ -44,7 +44,7 @@ function App() {
() => { () => {
setLoading(true); setLoading(true);
fetch('http://localhost:8080/solve', { fetch(`${process.env.NODE_ENV === 'development' ? '//localhost:8080' : ''}/solve`, {
method: 'POST', method: 'POST',
headers: { headers: {
'Content-Type': 'application/json', 'Content-Type': 'application/json',
@ -75,11 +75,10 @@ function App() {
label="Put your code here:" label="Put your code here:"
helperText={( helperText={(
<> <>
For more info on the syntax, have a look For more info on the syntax, have a
<Link href="https://github.com/ellmau/adf-obdd" target="_blank" rel="noreferrer">here</Link> look <Link href="https://github.com/ellmau/adf-obdd" target="_blank" rel="noreferrer">here</Link>.
.
</> </>
)} )}
multiline multiline
fullWidth fullWidth
variant="filled" variant="filled"