-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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
Nv 3005 the new sms editor #5197
Nv 3005 the new sms editor #5197
Conversation
const { pathname } = useLocation(); | ||
|
||
const isPreviewPath = pathname.endsWith('/preview'); | ||
const showEditOverlay = isHovered && isPreviewPath; |
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.
Show the edit option only when in the preview route - not in the editor
if (!showPreviewAsLoading) { | ||
getSmsPreview({ | ||
content: previewData.current.templateContent, | ||
payload: previewData.current.processedVariables, | ||
locale, | ||
}); | ||
} | ||
}, [locale, previewData, getSmsPreview, showPreviewAsLoading]); |
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.
trigger use effect when showPreviewAsLoading is toggled, and call the preview endpoint only when typing in editor has timed out
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 change does this PR introduce?
The new SMS editor layout with the preview
Why was this change needed?
Other information (Screenshots)