-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Took out most usages of process.env and replaced with config file. #161
Conversation
Except for src/ServiceWorker.js and ./cypress/plugins because I don't think it's a super good idea to change anything in those.
Deploy preview for hknucsd-portal-dev ready! Built with commit da132b2 |
@@ -0,0 +1,23 @@ | |||
type Config = { | |||
apiKey?: string; | |||
authDomain?: string; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what is this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i dont have it in my local .env and it's still fine
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
idk just part of the firebase config
src/config.ts
Outdated
storageBucket?: string; | ||
messagingSenderID?: string; | ||
appID?: string; | ||
apiBaseURL?: string; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
apiURL should be good
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe I should just remove this completely in some other pr, as discussed in some other comment below?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we still need it for the ApiConfig store
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oh wait nvm yeah
src/index.tsx
Outdated
authDomain: config.authDomain, | ||
databaseURL: config.databaseURL, | ||
projectId: config.projectID, | ||
storageBuck: config.storageBucket, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what happened to my storageBucket :(
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
someone ate the et D:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lmao :))
src/services/auth.js
Outdated
|
||
const SIGN_UP_URL = `${process.env.REACT_APP_API_BASE_URL}${SIGNUP_ENDPOINT}`; | ||
const SIGN_UP_URL = `${config.apiBaseURL}${SIGNUP_ENDPOINT}`; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is this even used? we should change this to the autogen stuff (can be for later pr)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah since we have autogen this is not needed anymore, including the function that actually uses this url. Will remove in some other pr
tsconfig.json
Outdated
"src" | ||
], | ||
"extends": "./tsconfig.paths.json" | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
THERE'S NO NEW LINE
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
dude idek anymore newline kinda jank doe
) * Took out most usages of process.env and replaced with config file. Except for src/ServiceWorker.js and ./cypress/plugins because I don't think it's a super good idea to change anything in those. * Made changes based on review+discussions from PR #161.
Except for src/ServiceWorker.js and ./cypress/plugins because I don't
think it's a super good idea to change anything in those.