Skip to content

Commit 718a4e4

Browse files
committed
move api endpoint and OAuth redirection url to env
1 parent 50e311b commit 718a4e4

File tree

2 files changed

+2
-6
lines changed

2 files changed

+2
-6
lines changed

src/components/Login.tsx

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,7 @@ import Card from './Card'
33

44
const Login = () => (
55
<Card classes="flex justify-center">
6-
<a
7-
href={encodeURI(
8-
'http://api.firstcontributions.com/v1/auth/redirect?origin=http://app.firstcontributions.com'
9-
)}
10-
>
6+
<a href={encodeURI(process.env.O_AUTH_REDIRECTION_URL as string)}>
117
<Button>Login with github</Button>
128
</a>
139
</Card>

src/relay/environment.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import {
1010
CacheConfig,
1111
} from 'relay-runtime'
1212

13-
const HTTP_ENDPOINT = 'https://api.opensource.forum/v1/graphql'
13+
const HTTP_ENDPOINT = process.env.API_ENDPOINT as string
1414
const IS_SERVER = typeof window === typeof undefined
1515
const CACHE_TTL = 5 * 1000 // 5 seconds, to resolve preloaded results
1616

0 commit comments

Comments
 (0)