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(dashboard,web): opt-in page flickering; login/logout redirect #7102

Merged
merged 1 commit into from
Nov 21, 2024

Conversation

ChmaraX
Copy link
Contributor

@ChmaraX ChmaraX commented Nov 21, 2024

What changed? Why was the change needed?

  • fixes a temporary flick of legacy workflows page when redirecting to new dashboard
  • redirect for opt-in users will happen on any domain where the legacy web is deployed

Fixes: NV-4838, NV-4825

Copy link

netlify bot commented Nov 21, 2024

Deploy Preview for novu-stg-vite-dashboard-poc ready!

Name Link
🔨 Latest commit 9659fed
🔍 Latest deploy log https://app.netlify.com/sites/novu-stg-vite-dashboard-poc/deploys/673f01c768097d0009e044be
😎 Deploy Preview https://deploy-preview-7102--novu-stg-vite-dashboard-poc.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@@ -13,29 +13,26 @@ export const useOptInRedirect = () => {
const { pathname } = useLocation();
const isNewDashboardEnabled = useFeatureFlag(FeatureFlagsKeysEnum.IS_NEW_DASHBOARD_ENABLED);
const { status, isLoaded, redirectToNewDashboard } = useNewDashboardOptIn();
const isUserOptedIn = isLoaded && status && status === NewDashboardOptInStatusEnum.OPTED_IN;
const dashboardV2HostName = window.location.hostname.includes('dashboard-v2');
Copy link
Contributor Author

Choose a reason for hiding this comment

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

this condition is not needed - we should redirect to new dashboard when legacy web is deployed on both dashboard-v2 and dashboard domains

@ChmaraX ChmaraX changed the title fix(dashboad,web): opt-in page flickering; login/logout redirect fix(dashboard,web): opt-in page flickering; login/logout redirect Nov 21, 2024
@ChmaraX ChmaraX merged commit f112a64 into next Nov 21, 2024
38 of 39 checks passed
@ChmaraX ChmaraX deleted the nv-4838-opt-in-state-not-persisted-after-logout branch November 21, 2024 10:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants