-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.js
28 lines (20 loc) · 908 Bytes
/
main.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
import { JoinUsSectionFactory } from './join-us-section.js'
import './scss_styles/style.css'
import { BigCommunityFactory } from './community-section'
import { Performance } from './performance.js'
const factorySection = new JoinUsSectionFactory();
const communitySection = new BigCommunityFactory();
const performance = new Performance();
document.addEventListener('DOMContentLoaded', () => {
communitySection.create()
if (localStorage.getItem('email')) {
const joinUsSection = factorySection.createSubscribed(true)
const main = document.querySelector('main');
main.insertBefore(joinUsSection, main.children[5]);
} else {
const joinUsSection = factorySection.createSubscribed(false)
const main = document.querySelector('main');
main.insertBefore(joinUsSection, main.children[5]);
}
performance.measureFetchAndSend()
})