Commit e4e31028 authored by Kushal Pandya's avatar Kushal Pandya

Load refactored Epic app when cookie flag is true

parent 83982b92
import ZenMode from '~/zen_mode';
import Cookies from 'js-cookie';
import initEpicShow from 'ee/epics/epic_show/epic_show_bundle';
import ShortcutsEpic from 'ee/behaviors/shortcuts/shortcuts_epic';
import initEpicApp from 'ee/epic/epic_bundle';
import '~/notes/index';
document.addEventListener('DOMContentLoaded', () => {
new ZenMode(); // eslint-disable-line no-new
initEpicShow();
new ShortcutsEpic(); // eslint-disable-line no-new
if (Cookies.get('load_new_epic_app') === 'true') {
initEpicApp();
} else {
initEpicShow();
new ShortcutsEpic(); // eslint-disable-line no-new
}
});
......@@ -11,7 +11,10 @@
- page_card_attributes @epic.card_attributes
#epic-show-app{ data: epic_show_app_data(@epic, author_icon: avatar_icon_for_user(@epic.author), initial: issuable_initial_data(@epic)) }
- if cookies[:load_new_epic_app] == 'true'
#epic-app-root{ data: epic_show_app_data(@epic, author_icon: avatar_icon_for_user(@epic.author), initial: issuable_initial_data(@epic)) }
- else
#epic-show-app{ data: epic_show_app_data(@epic, author_icon: avatar_icon_for_user(@epic.author), initial: issuable_initial_data(@epic)) }
.content-block.emoji-block
.row
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment