summaryrefslogtreecommitdiff
path: root/app/assets/javascripts/pages/explore/groups/index.js
diff options
context:
space:
mode:
Diffstat (limited to 'app/assets/javascripts/pages/explore/groups/index.js')
-rw-r--r--app/assets/javascripts/pages/explore/groups/index.js16
1 files changed, 16 insertions, 0 deletions
diff --git a/app/assets/javascripts/pages/explore/groups/index.js b/app/assets/javascripts/pages/explore/groups/index.js
new file mode 100644
index 00000000000..3c7edbdd7c7
--- /dev/null
+++ b/app/assets/javascripts/pages/explore/groups/index.js
@@ -0,0 +1,16 @@
+import GroupsList from '~/groups_list';
+import Landing from '~/landing';
+import initGroupsList from '../../../groups';
+
+document.addEventListener('DOMContentLoaded', () => {
+ new GroupsList(); // eslint-disable-line no-new
+ initGroupsList();
+ const landingElement = document.querySelector('.js-explore-groups-landing');
+ if (!landingElement) return;
+ const exploreGroupsLanding = new Landing(
+ landingElement,
+ landingElement.querySelector('.dismiss-button'),
+ 'explore_groups_landing_dismissed',
+ );
+ exploreGroupsLanding.toggle();
+});