Closed Lxkas closed 10 months ago
Initially, this didn't actually work simply because the APP_ENV environment variable is not present during build time when the const is inlined, so basically as a workaround, we have the server send the env var to the page via getServerSideProps.
This pull request replaces the usage of the constant API_BASE_LINK with a proper implementation that takes into account the environment (production or beta). This ensures that the correct API base link is used in each environment. The changes are made in the files ResourcesPage.tsx and StudyPlansPage.tsx. Additionally, a new utility function withAPIBaseLink is added to handle the API base link logic.
I smell AI from this PR description
This pull request replaces the usage of the constant API_BASE_LINK with a proper implementation that takes into account the environment (production or beta). This ensures that the correct API base link is used in each environment. The changes are made in the files ResourcesPage.tsx and StudyPlansPage.tsx. Additionally, a new utility function withAPIBaseLink is added to handle the API base link logic.
I smell AI from this PR description
What do you meannnnn totally No AI here at all!
resolve the nit first before merge :)
Uhhhh it's OK!! XDDDD If u can, remove it for me when you're done with dinner thankssss
resolve the nit first before merge :)
Uhhhh it's OK!! XDDDD If u can, remove it for me when you're done with dinner thankssss
... ok, I'll remove and merge
This pull request replaces the usage of the constant API_BASE_LINK with a proper implementation that takes into account the environment (production or beta). This ensures that the correct API base link is used in each environment. The changes are made in the files ResourcesPage.tsx and StudyPlansPage.tsx. Additionally, a new utility function withAPIBaseLink is added to handle the API base link logic.