Skip to content
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

fix: env custom pages conditional render #525

Merged

Conversation

KristinAoki
Copy link
Member

The conditional check for the value of env.ENABLE_NEW_CUSTOM_PAGES checked for a boolean value rather than a stringified boolean. This caused the custom pages card on the "Pages & Resources" to always navigate to the MFE page for custom pages regardless of the env variable.

To test this, try to navigate to the "Custom pages" page with env variable equal to false. Go to the "Pages & Resources" page and click on the "Custom pages" card. The new page should load the headers, but nothing else. With the variable set to true, navigate back to the "Pages & Resources" page and click on the "Custom pages" card. Now the page should load as expected.

@codecov
Copy link

codecov bot commented Jun 27, 2023

Codecov Report

Patch coverage: 100.00% and no project coverage change.

Comparison is base (1394570) 77.42% compared to head (c8128a5) 77.42%.

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #525   +/-   ##
=======================================
  Coverage   77.42%   77.42%           
=======================================
  Files         120      120           
  Lines        2352     2352           
  Branches      568      568           
=======================================
  Hits         1821     1821           
  Misses        502      502           
  Partials       29       29           
Impacted Files Coverage Δ
src/pages-and-resources/pages/PageCard.jsx 94.11% <100.00%> (ø)

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

Copy link
Contributor

@connorhaugh connorhaugh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@KristinAoki KristinAoki merged commit 2c71385 into master Jun 29, 2023
@KristinAoki KristinAoki deleted the KristinAoki/fix-custom-page-misdirect-on-env-variable branch June 29, 2023 14:45
PKulkoRaccoonGang pushed a commit to raccoongang/frontend-app-course-authoring that referenced this pull request Jun 30, 2023
snglth pushed a commit to Abstract-Tech/community-theme-course-authoring that referenced this pull request Jan 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants