refactors, dynamic constants (lol)

This commit is contained in:
mrfry 2023-03-29 19:12:41 +02:00
parent 755891710a
commit d4553896af
25 changed files with 323 additions and 312 deletions

15
src/constants.js Normal file
View file

@ -0,0 +1,15 @@
// eslint-disable-next-line no-undef
const useLocalhost = process && process.env.NODE_ENV === 'development'
const constants = {
siteUrl: !useLocalhost ? 'http://frylabs.net/' : 'http://localhost:8080/',
apiUrl: !useLocalhost
? 'http://frylabs.net/api/'
: 'http://localhost:8080/api/',
chatUrl: !useLocalhost ? 'http://frylabs.net/' : 'http://localhost:8080/',
mobileWindowWidth: 700,
maxQuestionsToRender: 250,
imageExts: ['gif', 'png', 'jpeg', 'jpg'],
videoExts: ['mp4', 'mkv', 'webm'],
}
export default constants