mirror of
https://github.com/openmhz/trunk-server.git
synced 2026-11-11 00:07:30 -05:00
Frontend doesn't have access to env variables - pass the details in from the server.
This commit is contained in:
@@ -1,9 +1,6 @@
|
||||
import React, { Component } from "react";
|
||||
import { Container, Header } from "semantic-ui-react";
|
||||
|
||||
var site_name = process.env['SITE_NAME'] != null ? process.env['SITE_NAME'] : "OpenMHz";
|
||||
var admin_email = process.env['ADMIN_EMAIL'] != null ? process.env['ADMIN_EMAIL'] : "luke@openmhz.com";
|
||||
|
||||
class About extends Component {
|
||||
|
||||
|
||||
|
||||
@@ -8,8 +8,6 @@ const navStyle = {
|
||||
const blankStyle = {
|
||||
marginBottom: "50px"
|
||||
};
|
||||
var account_server = process.env['ACCOUNT_SERVER'] != null ? process.env['ACCOUNT_SERVER'] : 'https://account.openmhz.com';
|
||||
var site_name = process.env['SITE_NAME'] != null ? process.env['SITE_NAME'] : "OpenMHz";
|
||||
|
||||
class Navigation extends Component {
|
||||
constructor(props) {
|
||||
|
||||
@@ -132,6 +132,7 @@ function isLoggedIn(req, res, next) {
|
||||
|
||||
|
||||
var admin_server = process.env['ADMIN_SERVER'] != null ? process.env['ADMIN_SERVER'] : 'https://admin.openmhz.com';
|
||||
var admin_email = process.env['ADMIN_EMAIL'] != null ? process.env['ADMIN_EMAIL'] : "luke@openmhz.com";
|
||||
var beta_frontend_server = process.env['BETA_FRONTEND_SERVER'] != null ? process.env['BETA_FRONTEND_SERVER'] : 'https://beta.openmhz.com';
|
||||
var backend_server = process.env['BACKEND_SERVER'] != null ? process.env['BACKEND_SERVER'] : 'https://api.openmhz.com';
|
||||
var frontend_server = process.env['FRONTEND_SERVER'] != null ? process.env['FRONTEND_SERVER'] : 'https://openmhz.com';
|
||||
@@ -189,6 +190,8 @@ app.get("*", (req, res, next) => {
|
||||
const media_server = "${media_server}";
|
||||
const socket_server = "${socket_server}";
|
||||
const account_server = "${account_server}";
|
||||
const site_name = "${site_name}";
|
||||
const admin_email = "${admin_email}";
|
||||
const proPlanValue = ${proPlanValue};
|
||||
const freePlanValue = ${freePlanValue};
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user