Main.ts
1009 Bytes
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
29
30
31
32
33
34
35
36
37
38
39
/**
* @author : wonseog
* @date : 2021/03/10
* @description : 로그인 이후 첫 화면
* 업데이트하기
* 다른 메뉴 보기
**/
import {getState} from "@src/store/state";
const Main = () => {
const state = getState();
let followers : string = '';
let following : string = '';
state.followers?.forEach(id => {
followers += `<div>${id}</div>`
});
state.following?.forEach(id => {
following += `<div>${id}</div>`
});
return `
<div class="main">
<div id="profile">
<img src="${state.src}" alt="${state.insta_id}-image"/>
<span class="profile-id">${state.insta_id}</span>
</div>
<div id="list">
<div id="followers">
${followers}
</div>
<div id="following">
${following}
</div>
</div>
</div>
`
}
export default Main