Skip to content

Commit

Permalink
Update ENV variables
Browse files Browse the repository at this point in the history
  • Loading branch information
DConnorFong committed Apr 10, 2021
1 parent 5702dd1 commit b27dcc0
Show file tree
Hide file tree
Showing 9 changed files with 10 additions and 9 deletions.
2 changes: 1 addition & 1 deletion src/components/auth/AuthUtil.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import Cookies from 'js-cookie';
import axios from 'axios';

const apiEndpoint = process.env.API_ENDPOINT || 'http://localhost:4000';
const apiEndpoint = process.env.REACT_APP_API_ENDPOINT || 'http://localhost:4000';

/* Check if the token is still valid */
const AuthUtil = {
Expand Down
2 changes: 1 addition & 1 deletion src/components/auth/GoogleLoginButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import Cookies from 'js-cookie';
import axios from 'axios';

const clientId = '215320798103-7kvftlie6bbu31nb9tgvqqq7sd7p50e6.apps.googleusercontent.com';
const apiEndpoint = process.env.API_ENDPOINT || 'http://localhost:4000';
const apiEndpoint = process.env.REACT_APP_API_ENDPOINT || 'http://localhost:4000';

interface IGoogleLoginButtonProps {
/* Toggle login vs. signup mode */
Expand Down
3 changes: 2 additions & 1 deletion src/components/auth/GoogleSignupButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import Cookies from 'js-cookie';
import axios from 'axios';

const clientId = '215320798103-7kvftlie6bbu31nb9tgvqqq7sd7p50e6.apps.googleusercontent.com';
const apiEndpoint = process.env.REACT_APP_API_ENDPOINT || 'http://localhost:4000';

interface ICredentials {
email: string;
Expand Down Expand Up @@ -35,7 +36,7 @@ class GoogleSignupButton extends React.Component<IGoogleSignUpButtonProps> {
timeout: 2000,
};
axios
.get('http://localhost:4000/user', config)
.get(`${apiEndpoint}/user`, config)
.then((result: any) => {
const doesExist = result.data.exists;

Expand Down
2 changes: 1 addition & 1 deletion src/components/dashboard/dashboard-list/DashboardList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import DashboardListCard from './DashboardListCard';
import ApplicantManagementModal from '../../modals/ApplicantManagementModal';
import './DashboardList.scss';

const apiEndpoint = process.env.API_ENDPOINT || 'http://localhost:4000';
const apiEndpoint = process.env.REACT_APP_API_ENDPOINT || 'http://localhost:4000';

type DashboardListProps = {
mode: string;
Expand Down
2 changes: 1 addition & 1 deletion src/components/login/SignUpForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import Cookies from 'js-cookie';
import './LoginForm.scss';
import GoogleSignupButton from '../../components/auth/GoogleSignupButton';

const apiEndpoint = process.env.API_ENDPOINT || 'http://localhost:4000';
const apiEndpoint = process.env.REACT_APP_API_ENDPOINT || 'http://localhost:4000';

interface ISignUpFormProps {
onClick: () => void;
Expand Down
2 changes: 1 addition & 1 deletion src/components/options/Options.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import SheetListCard from './SheetListCard';
import SheetModal from '../modals/SheetModal';
import ErrorModal from '../modals/ErrorModal';

const apiEndpoint = process.env.API_ENDPOINT || 'http://localhost:4000';
const apiEndpoint = process.env.REACT_APP_API_ENDPOINT || 'http://localhost:4000';

class OptionsComponent extends React.Component<any, any> {
constructor(props: any) {
Expand Down
2 changes: 1 addition & 1 deletion src/components/scoring/Scoring.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import { faCode, faPaintBrush } from '@fortawesome/free-solid-svg-icons';
import axios from 'axios';
import InterviewForm from './InterviewForm';

const apiEndpoint = process.env.API_ENDPOINT || 'http://localhost:4000';
const apiEndpoint = process.env.REACT_APP_API_ENDPOINT || 'http://localhost:4000';

interface IApplicantInfoProps {
id: string;
Expand Down
2 changes: 1 addition & 1 deletion src/views/Archive.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import ArchiveHeader from '../components/archive/ArchiveHeader';
import ArchiveList from '../components/archive/ArchiveList';
import Scoring from '../components/scoring/Scoring';

const apiEndpoint = process.env.API_ENDPOINT || 'http://localhost:4000';
const apiEndpoint = process.env.REACT_APP_API_ENDPOINT || 'http://localhost:4000';

interface IApplicantInfoProps {
id: string;
Expand Down
2 changes: 1 addition & 1 deletion src/views/Dashboard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import './Dashboard.scss';
import ApplicantInfo from '../components/applicant/ApplicantInfo';
import ScreeningStage from '../components/screening/ScreeningStage';

const apiEndpoint = process.env.API_ENDPOINT || 'http://localhost:4000';
const apiEndpoint = process.env.REACT_APP_API_ENDPOINT || 'http://localhost:4000';

interface IApplicantInfoProps {
id: string;
Expand Down

0 comments on commit b27dcc0

Please sign in to comment.