Skip to content

Commit

Permalink
fix: updated the docker env to string
Browse files Browse the repository at this point in the history
  • Loading branch information
BiswaViraj committed Jun 18, 2022
1 parent 0e05a9e commit 1a97538
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions apps/web/src/components/auth/LoginForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import { AuthContext } from '../../store/authContext';
import { api } from '../../api/api.client';
import { PasswordInput, Button, colors, Input, Text } from '../../design-system';
import { Github } from '../../design-system/icons';
import { API_ROOT, GITHUB_AUTH_OPTION } from '../../config';
import { API_ROOT, IS_DOCKER_HOSTED } from '../../config';

type Props = {};

Expand Down Expand Up @@ -51,7 +51,7 @@ export function LoginForm({}: Props) {

return (
<>
{GITHUB_AUTH_OPTION && (
{!IS_DOCKER_HOSTED && (
<>
<GithubButton
component="a"
Expand Down
4 changes: 2 additions & 2 deletions apps/web/src/components/auth/SignUpForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import { AuthContext } from '../../store/authContext';
import { api } from '../../api/api.client';
import { PasswordInput, Button, colors, Input, Text } from '../../design-system';
import { Github } from '../../design-system/icons';
import { API_ROOT, GITHUB_AUTH_OPTION } from '../../config';
import { API_ROOT, IS_DOCKER_HOSTED } from '../../config';
import { showNotification } from '@mantine/notifications';

type Props = {
Expand Down Expand Up @@ -84,7 +84,7 @@ export function SignUpForm({ token, email }: Props) {

return (
<>
{GITHUB_AUTH_OPTION && !token && (
{!IS_DOCKER_HOSTED && !token && (
<>
<GithubButton
my={30}
Expand Down
2 changes: 1 addition & 1 deletion apps/web/src/config/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,4 @@ export const APP_ID = process.env.REACT_APP_NOVU_APP_ID;

export const WIDGET_EMEBED_PATH = process.env.REACT_APP_WIDGET_EMBED_PATH || 'http://localhost:4701/embed.umd.min.js';

export const GITHUB_AUTH_OPTION = !!process.env.REACT_APP_DOCKER_HOSTED_ENV;
export const IS_DOCKER_HOSTED = process.env.REACT_APP_DOCKER_HOSTED_ENV === 'true';
2 changes: 1 addition & 1 deletion docker/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ services:
REACT_APP_API_URL: ${API_ROOT_URL}
REACT_APP_ENVIRONMENT: ${NODE_ENV}
REACT_APP_WIDGET_EMBED_PATH: ${WIDGET_EMBED_PATH}
REACT_APP_DOCKER_HOSTED_ENV: true
REACT_APP_DOCKER_HOSTED_ENV: 'true'
ports:
- 4200:4200
volumes:
Expand Down

0 comments on commit 1a97538

Please sign in to comment.