stamford-syntax-club / stamfordcenter-frontend

https://center.stamford.dev/
MIT License
0 stars 0 forks source link

replace API_BASE_LINK with proper implementation #61

Closed Lxkas closed 10 months ago

Lxkas commented 10 months ago

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.

Lxkas commented 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.

chinathaip commented 10 months ago

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

Lxkas commented 10 months ago

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!

Lxkas commented 10 months ago

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

chinathaip commented 10 months ago

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