= ({
setEditorRedesignStatus,
hide,
loading,
}) => {
const { t } = useTranslation()
const { sendEvent } = useEditorAnalytics()
const enable = useCallback(() => {
sendEvent('editor-redesign-toggle', {
action: 'enable',
location: 'modal',
})
setEditorRedesignStatus(true)
.then(hide)
.catch(() => {
// do nothing, we're already showing the error
})
}, [setEditorRedesignStatus, hide, sendEvent])
return (
<>
{t('help_shape_the_future_of_overleaf')}
{t('were_redesigning_our_editor_to_make_it_easier_to_use')}
{t('cancel')}
{t('switch_to_new_editor')}
>
)
}
const SwitcherWhatsNew = () => {
const { t } = useTranslation()
const newErrorlogs = useFeatureFlag('new-editor-error-logs-redesign')
return (
{t('latest_updates')}
{newErrorlogs && - {t('new_error_logs_panel')}
}
- {t('searching_all_project_files_is_now_available')}
- {t('double_clicking_on_the_pdf_shows')}
{t('whats_different_in_the_new_editor')}
- {t('new_look_and_feel')}
-
{t('new_navigation_introducing_left_hand_side_rail_and_top_menus')}
- {t('new_look_and_placement_of_the_settings')}
- {t('improved_dark_mode')}
- {t('review_panel_and_error_logs_moved_to_the_left')}
)
}
const LeavingNote = () => {
return (
]}
shouldUnescape
tOptions={{ interpolation: { escapeValue: true } }}
/>
)
}